IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Apache Discussion :

Couplage Apache HTTP & Tomcat - Url Rewriting


Sujet :

Apache

  1. #1
    Invité
    Invité(e)
    Par défaut Couplage Apache HTTP & Tomcat - Url Rewriting
    Bonjour,

    J'ai trouvé ce superbe tutoriel qui correspond parfaitement à ce que je cherche à faire.
    Tout ce passe bien jusqu'a l'implémentation de l'Url Rewriting ( V. Installation du mod_rewrite )

    Citation Envoyé par Couplage Apache Http & Tomcat : V. Installation du mod_rewrite
    <VirtualHost *:80>
    RewriteEngine On
    RewriteRule ^(.*)$ http://localhost/tomcat-docs$1 [L]
    </VirtualHost>
    J'ai bien placé ceci dans mon fichier de configuration apache mais lorsque je tente d'accéder à 'Http://localhost/' l'url se transforme en ceci :
    'http://localhost/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/'
    et évidemment cela m'amène une erreur :
    Citation Envoyé par Firefox
    Redirection de page incorrecte.
    Firefox a détecté que le serveur redirige la demande pour cette adresse d'une manière qui n'aboutira pas.
    Je soupçonne la règle de redirection qui est validée à chaque fois mais je ne parviens pas à la modifier.

    Pouvez-vous m'aider ? Merci
    Dernière modification par julp ; 14/05/2007 à 11h32.

  2. #2
    Rédacteur
    Avatar de _Mac_
    Profil pro
    Inscrit en
    Août 2005
    Messages
    9 601
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2005
    Messages : 9 601
    Points : 12 977
    Points
    12 977
    Par défaut
    Yes, y a un "bug" dans la doc La règle de rewrite est trop permissive, en effet. Faut mettre un RewriteCond avant pour limiter l'effet de la règle de réécriture :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    <VirtualHost *:80>
    RewriteEngine On
    RewriteCond ${REQUEST_URI} !^/tomcat-docs.*
    RewriteRule ^(.*)$ http://localhost/tomcat-docs$1 [L]
    </VirtualHost>
    Faut vérifier, j'ai pas testé.

  3. #3
    Invité
    Invité(e)
    Par défaut
    Même avec cette condition, le résultat reste le même !

  4. #4
    Rédacteur
    Avatar de _Mac_
    Profil pro
    Inscrit en
    Août 2005
    Messages
    9 601
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2005
    Messages : 9 601
    Points : 12 977
    Points
    12 977
    Par défaut
    Plutôt surprenant, je dois dire... T'as bien redémarré Apache ? C'est toujours le même message de Firefox ?

  5. #5
    Invité
    Invité(e)
    Par défaut
    Bonjour,

    Désolé pour la lenteur de ma réponse (maladie et jours fériés en cause).

    Oui j'ai déja redémarré apache, et j'ai toujours le même message.

  6. #6
    Rédacteur
    Avatar de _Mac_
    Profil pro
    Inscrit en
    Août 2005
    Messages
    9 601
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2005
    Messages : 9 601
    Points : 12 977
    Points
    12 977
    Par défaut
    Ce qui peut être pas mal c'est que t'installe l'extension LiveHTTPHeaders dans Firefox pour tracer exactement les redirections qui sont faites par Apache. Quand tu as une trace, donne la nous. Redonne-nous également ta conf Apache.

  7. #7
    Invité
    Invité(e)
    Par défaut
    Voilà :

    Citation Envoyé par LiveHttpHeaders

    GET / HTTP/1.1
    Host: localhost
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive

    HTTP/1.x 302 Found
    Date: Wed, 30 May 2007 11:01:42 GMT
    Server: Apache/2.2.4 (Win32) mod_jk/1.2.22
    Location: http://localhost/tomcat-docs/
    Content-Length: 213
    Keep-Alive: timeout=5, max=100
    Connection: Keep-Alive
    Content-Type: text/html; charset=iso-8859-1
    ----------------------------------------------------------
    http://localhost/tomcat-docs/

    GET /tomcat-docs/ HTTP/1.1
    Host: localhost
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive

    HTTP/1.x 302 Found
    Date: Wed, 30 May 2007 11:01:42 GMT
    Server: Apache/2.2.4 (Win32) mod_jk/1.2.22
    Location: http://localhost/tomcat-docs/tomcat-docs/
    Content-Length: 225
    Keep-Alive: timeout=5, max=99
    Connection: Keep-Alive
    Content-Type: text/html; charset=iso-8859-1
    ----------------------------------------------------------
    http://localhost/tomcat-docs/tomcat-docs/

    GET /tomcat-docs/tomcat-docs/ HTTP/1.1
    Host: localhost
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive

    HTTP/1.x 302 Found
    Date: Wed, 30 May 2007 11:01:42 GMT
    Server: Apache/2.2.4 (Win32) mod_jk/1.2.22
    Location: http://localhost/tomcat-docs/tomcat-docs/tomcat-docs/
    Content-Length: 237
    Keep-Alive: timeout=5, max=98
    Connection: Keep-Alive
    Content-Type: text/html; charset=iso-8859-1
    ----------------------------------------------------------
    http://localhost/tomcat-docs/tomcat-docs/tomcat-docs/

    GET /tomcat-docs/tomcat-docs/tomcat-docs/ HTTP/1.1
    Host: localhost
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive

    HTTP/1.x 302 Found
    Date: Wed, 30 May 2007 11:01:42 GMT
    Server: Apache/2.2.4 (Win32) mod_jk/1.2.22
    Location: http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/
    Content-Length: 249
    Keep-Alive: timeout=5, max=97
    Connection: Keep-Alive
    Content-Type: text/html; charset=iso-8859-1
    ----------------------------------------------------------
    http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/

    GET /tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/ HTTP/1.1
    Host: localhost
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive

    HTTP/1.x 302 Found
    Date: Wed, 30 May 2007 11:01:42 GMT
    Server: Apache/2.2.4 (Win32) mod_jk/1.2.22
    Location: http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/
    Content-Length: 261
    Keep-Alive: timeout=5, max=96
    Connection: Keep-Alive
    Content-Type: text/html; charset=iso-8859-1
    ----------------------------------------------------------
    http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/

    GET /tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/ HTTP/1.1
    Host: localhost
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive

    HTTP/1.x 302 Found
    Date: Wed, 30 May 2007 11:01:42 GMT
    Server: Apache/2.2.4 (Win32) mod_jk/1.2.22
    Location: http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/
    Content-Length: 273
    Keep-Alive: timeout=5, max=95
    Connection: Keep-Alive
    Content-Type: text/html; charset=iso-8859-1
    ----------------------------------------------------------
    http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/

    GET /tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/ HTTP/1.1
    Host: localhost
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive

    HTTP/1.x 302 Found
    Date: Wed, 30 May 2007 11:01:42 GMT
    Server: Apache/2.2.4 (Win32) mod_jk/1.2.22
    Location: http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/
    Content-Length: 285
    Keep-Alive: timeout=5, max=94
    Connection: Keep-Alive
    Content-Type: text/html; charset=iso-8859-1
    ----------------------------------------------------------
    http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/

    GET /tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/ HTTP/1.1
    Host: localhost
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive

    HTTP/1.x 302 Found
    Date: Wed, 30 May 2007 11:01:42 GMT
    Server: Apache/2.2.4 (Win32) mod_jk/1.2.22
    Location: http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/
    Content-Length: 297
    Keep-Alive: timeout=5, max=93
    Connection: Keep-Alive
    Content-Type: text/html; charset=iso-8859-1
    ----------------------------------------------------------
    http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/

    GET /tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/ HTTP/1.1
    Host: localhost
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive

    HTTP/1.x 302 Found
    Date: Wed, 30 May 2007 11:01:42 GMT
    Server: Apache/2.2.4 (Win32) mod_jk/1.2.22
    Location: http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/
    Content-Length: 309
    Keep-Alive: timeout=5, max=92
    Connection: Keep-Alive
    Content-Type: text/html; charset=iso-8859-1
    ----------------------------------------------------------
    http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/

    GET /tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/ HTTP/1.1
    Host: localhost
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive

    HTTP/1.x 302 Found
    Date: Wed, 30 May 2007 11:01:42 GMT
    Server: Apache/2.2.4 (Win32) mod_jk/1.2.22
    Location: http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/
    Content-Length: 321
    Keep-Alive: timeout=5, max=91
    Connection: Keep-Alive
    Content-Type: text/html; charset=iso-8859-1
    ----------------------------------------------------------
    http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/

    GET /tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/ HTTP/1.1
    Host: localhost
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive

    HTTP/1.x 302 Found
    Date: Wed, 30 May 2007 11:01:42 GMT
    Server: Apache/2.2.4 (Win32) mod_jk/1.2.22
    Location: http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/
    Content-Length: 333
    Keep-Alive: timeout=5, max=90
    Connection: Keep-Alive
    Content-Type: text/html; charset=iso-8859-1
    ----------------------------------------------------------
    http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/

    GET /tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/ HTTP/1.1
    Host: localhost
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive

    HTTP/1.x 302 Found
    Date: Wed, 30 May 2007 11:01:42 GMT
    Server: Apache/2.2.4 (Win32) mod_jk/1.2.22
    Location: http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/
    Content-Length: 345
    Keep-Alive: timeout=5, max=89
    Connection: Keep-Alive
    Content-Type: text/html; charset=iso-8859-1
    ----------------------------------------------------------
    http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/

    GET /tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/ HTTP/1.1
    Host: localhost
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive

    HTTP/1.x 302 Found
    Date: Wed, 30 May 2007 11:01:42 GMT
    Server: Apache/2.2.4 (Win32) mod_jk/1.2.22
    Location: http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/
    Content-Length: 357
    Keep-Alive: timeout=5, max=88
    Connection: Keep-Alive
    Content-Type: text/html; charset=iso-8859-1
    ----------------------------------------------------------
    http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/

    GET /tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/ HTTP/1.1
    Host: localhost
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive

    HTTP/1.x 302 Found
    Date: Wed, 30 May 2007 11:01:42 GMT
    Server: Apache/2.2.4 (Win32) mod_jk/1.2.22
    Location: http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/
    Content-Length: 369
    Keep-Alive: timeout=5, max=87
    Connection: Keep-Alive
    Content-Type: text/html; charset=iso-8859-1
    ----------------------------------------------------------
    http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/

    GET /tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/ HTTP/1.1
    Host: localhost
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive

    HTTP/1.x 302 Found
    Date: Wed, 30 May 2007 11:01:42 GMT
    Server: Apache/2.2.4 (Win32) mod_jk/1.2.22
    Location: http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/
    Content-Length: 381
    Keep-Alive: timeout=5, max=86
    Connection: Keep-Alive
    Content-Type: text/html; charset=iso-8859-1
    ----------------------------------------------------------
    http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/

    GET /tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/ HTTP/1.1
    Host: localhost
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive

    HTTP/1.x 302 Found
    Date: Wed, 30 May 2007 11:01:42 GMT
    Server: Apache/2.2.4 (Win32) mod_jk/1.2.22
    Location: http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/
    Content-Length: 393
    Keep-Alive: timeout=5, max=85
    Connection: Keep-Alive
    Content-Type: text/html; charset=iso-8859-1
    ----------------------------------------------------------
    http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/

    GET /tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/ HTTP/1.1
    Host: localhost
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive

    HTTP/1.x 302 Found
    Date: Wed, 30 May 2007 11:01:42 GMT
    Server: Apache/2.2.4 (Win32) mod_jk/1.2.22
    Location: http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/
    Content-Length: 405
    Keep-Alive: timeout=5, max=84
    Connection: Keep-Alive
    Content-Type: text/html; charset=iso-8859-1
    ----------------------------------------------------------
    http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/

    GET /tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/ HTTP/1.1
    Host: localhost
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive

    HTTP/1.x 302 Found
    Date: Wed, 30 May 2007 11:01:42 GMT
    Server: Apache/2.2.4 (Win32) mod_jk/1.2.22
    Location: http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/
    Content-Length: 417
    Keep-Alive: timeout=5, max=83
    Connection: Keep-Alive
    Content-Type: text/html; charset=iso-8859-1
    ----------------------------------------------------------
    http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/

    GET /tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/ HTTP/1.1
    Host: localhost
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive

    HTTP/1.x 302 Found
    Date: Wed, 30 May 2007 11:01:42 GMT
    Server: Apache/2.2.4 (Win32) mod_jk/1.2.22
    Location: http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/
    Content-Length: 429
    Keep-Alive: timeout=5, max=82
    Connection: Keep-Alive
    Content-Type: text/html; charset=iso-8859-1
    ----------------------------------------------------------
    http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/

    GET /tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/ HTTP/1.1
    Host: localhost
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive

    HTTP/1.x 302 Found
    Date: Wed, 30 May 2007 11:01:42 GMT
    Server: Apache/2.2.4 (Win32) mod_jk/1.2.22
    Location: http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/
    Content-Length: 441
    Keep-Alive: timeout=5, max=81
    Connection: Keep-Alive
    Content-Type: text/html; charset=iso-8859-1
    ----------------------------------------------------------
    http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/

    GET /tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/tomcat-docs/ HTTP/1.1
    Host: localhost
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive

    HTTP/1.x 302 Found
    Date: Wed, 30 May 2007 11:01:42 GMT
    Server: Apache/2.2.4 (Win32) mod_jk/1.2.22
    Location: http://localhost/tomcat-docs/tomcat-...s/tomcat-docs/
    Content-Length: 453
    Keep-Alive: timeout=5, max=80
    Connection: Keep-Alive
    Content-Type: text/html; charset=iso-8859-1
    ----------------------------------------------------------
    Merci beaucoup

  8. #8
    Rédacteur
    Avatar de _Mac_
    Profil pro
    Inscrit en
    Août 2005
    Messages
    9 601
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2005
    Messages : 9 601
    Points : 12 977
    Points
    12 977
    Par défaut
    Effectivement, il boucle bien et c'est pas normal. Tu peux redonner ta conf Apache, STP.

  9. #9
    Rédacteur
    Avatar de _Mac_
    Profil pro
    Inscrit en
    Août 2005
    Messages
    9 601
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2005
    Messages : 9 601
    Points : 12 977
    Points
    12 977
    Par défaut
    C'est super bizarre ton truc car chez moi, ce qui est donné dans le tuto, ça marche bien si je crée un répertoire tomcat-docs dans mon document root :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    <VirtualHost *:80>
        RewriteEngine On
        RewriteRule ^(.*)$ http://localhost/tomcat-docs$1 [L]
    </VirtualHost>
    Marche, et :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    <VirtualHost *:80>
        RewriteEngine On
        RewriteCond ${REQUEST_URI} !^/tomcat-docs
        RewriteRule ^(.*)$ http://localhost/tomcat-docs$1 [L]
    </VirtualHost>
    Marche également. Le seul truc (dans les 2 cas), c'est que le navigateur n'est pas redirigé.

  10. #10
    Rédacteur
    Avatar de _Mac_
    Profil pro
    Inscrit en
    Août 2005
    Messages
    9 601
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2005
    Messages : 9 601
    Points : 12 977
    Points
    12 977
    Par défaut
    Cette conf marche aussi, avec redirection client :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    <VirtualHost *:80>
        RewriteEngine On
        RewriteCond %{REQUEST_URI} !^/tomcat-docs.*
        RewriteRule ^(.*)$ http://localhost/tomcat-docs$1 [R]
    </VirtualHost>

  11. #11
    Invité
    Invité(e)
    Par défaut
    Voici mon fichier conf :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
     
    ThreadsPerChild 250
    MaxRequestsPerChild  0
     
    ServerRoot "F:/apache/2.2"
     
    Listen 80
     
     
    LoadModule actions_module modules/mod_actions.so
    LoadModule alias_module modules/mod_alias.so
    LoadModule asis_module modules/mod_asis.so
    LoadModule auth_basic_module modules/mod_auth_basic.so
    LoadModule authn_default_module modules/mod_authn_default.so
    LoadModule authn_file_module modules/mod_authn_file.so
    LoadModule authz_default_module modules/mod_authz_default.so
    LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
    LoadModule authz_host_module modules/mod_authz_host.so
    LoadModule authz_user_module modules/mod_authz_user.so
    LoadModule autoindex_module modules/mod_autoindex.so
    LoadModule cgi_module modules/mod_cgi.so
    LoadModule dir_module modules/mod_dir.so
    LoadModule env_module modules/mod_env.so
    LoadModule imagemap_module modules/mod_imagemap.so
    LoadModule include_module modules/mod_include.so
    LoadModule isapi_module modules/mod_isapi.so
    LoadModule log_config_module modules/mod_log_config.so
    LoadModule mime_module modules/mod_mime.so
    LoadModule negotiation_module modules/mod_negotiation.so
    LoadModule rewrite_module modules/mod_rewrite.so
    LoadModule setenvif_module modules/mod_setenvif.so
    LoadModule userdir_module modules/mod_userdir.so
     
    LoadModule jk_module modules/mod_jk.so
    Mod_jk
    	JkWorkersFile "F:/apache/2.2/conf/worker.properties"
    	JkLogFile "G:/logs/mod_jk.log"
    	JkLogLevel warning
    	JkMount /tomcat-docs default
    	JkMount /tomcat-docs/* default
    End mod_jk
     
    ServerAdmin moi@XX.yy
     
    ServerName devsr3k.chhf.local:80
     
    DocumentRoot "H:/www"
     
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    	Order deny,allow
        Deny from all
        Satisfy all
    </Directory>
     
    <Directory "H:/www">
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
     
    <Directory "H:/www/devsrv/">
    	Order allow,deny
    	Allow from all
    </Directory>
     
    <IfModule dir_module>
        DirectoryIndex index.html index.htm index.jsp
    </IfModule>
     
    <FilesMatch "^\.ht">
        Order allow,deny
        Deny from all
    </FilesMatch>
     
    ErrorLog "G:/logs/apache/error.log"
     
    LogLevel warn
     
    <IfModule log_config_module>
        LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
        LogFormat "%h %l %u %t \"%r\" %>s %b" common
     
        <IfModule logio_module>
          LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
        </IfModule>
     
        CustomLog "G:/logs/apache/access.log" common
    </IfModule>
     
    <IfModule alias_module>
        ScriptAlias /cgi-bin/ "F:/apache/2.2/cgi-bin/"
    </IfModule>
     
    <Directory "F:/apache/2.2/cgi-bin">
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
    </Directory>
     
    DefaultType text/plain
     
    <IfModule mime_module>
        TypesConfig conf/mime.types
     
        AddType application/x-compress .Z
        AddType application/x-gzip .gz .tgz
     
    </IfModule>
     
     
    <IfModule ssl_module>
    SSLRandomSeed startup builtin
    SSLRandomSeed connect builtin
    </IfModule>
     
    <VirtualHost *:80>
    	RewriteEngine On
    	RewriteCond ${REQUEST_URI} !^/tomcat-docs.*
    	RewriteRule ^(.*)$ http://localhost/tomcat-docs$1 [L]	
    </VirtualHost>
    Mais par contre je n'ai pas 'tomcat-docs' dans 'H:\www'.
    J'ai 'tomcat-docs' dans le 'webapps' de Tomcat...

    Edit :
    J'ai crée un répertoire tomcat-docs dans H:\www (le document root d'apache) et ça ne change rien, si je copie le tomcat-docs de Tomcat dans le document root ça ne change rien non plus.

    Mon serveur est sous Windows 2003 mais je supopose que cela n'a aucune importances..
    Dernière modification par Invité ; 30/05/2007 à 15h34.

  12. #12
    Invité
    Invité(e)
    Par défaut
    Ha maintenant cela à l'air de fonctionner. Je n'aipourtant rien changé, juste retiré tous les commentaires dans http.conf...

    Seulement une fois que je change localhost par le nom du serveur ça ne marche plus :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
     
    LoadModule jk_module modules/mod_jk.so
    # Paramètres Mod_jk
    	JkWorkersFile "F:/apache/2.2/conf/worker.properties"
    	JkLogFile "G:/logs/mod_jk.log"
    	JkLogLevel warning
    	JkMount /tomcat-docs default
    	JkMount /tomcat-docs/* default
    # Fin Mod_jk
     
    ServerName devsrv.assoc.local:80
     
     
    <VirtualHost *:80>
    	RewriteEngine On
    	RewriteCond ${REQUEST_URI} !^/tomcat-docs.*
    	RewriteRule ^(.*)$ http://devsrv.assoc.local/tomcat-docs$1 [L]	
    </VirtualHost>
    J'ai ce mesage
    Not Found

    The requested URL / was not found on this server.
    pour l'adresse http://devsrv.assoc.local

    Edit : Ha ben non ça ne mareche plus !

  13. #13
    Rédacteur
    Avatar de _Mac_
    Profil pro
    Inscrit en
    Août 2005
    Messages
    9 601
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2005
    Messages : 9 601
    Points : 12 977
    Points
    12 977
    Par défaut
    Tomcat est démarré ? Sinon, tu peux virer le http://devsrv.assoc.local dans la RewriteRule, ca marche aussi et ça évite d'avoir le hostname en dur.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Couplage Apache HTTP & Tomcat
    Par farouk1301 dans le forum Tomcat et TomEE
    Réponses: 1
    Dernier message: 19/04/2013, 15h59
  2. Couplage Apache HTTP & Tomcat - Url Rewriting
    Par loulag07 dans le forum Apache
    Réponses: 1
    Dernier message: 27/01/2011, 14h31
  3. Réponses: 8
    Dernier message: 03/10/2008, 14h38
  4. Couplage Apache HTTP & Tomcat
    Par adilooo dans le forum Apache
    Réponses: 4
    Dernier message: 24/04/2008, 18h55
  5. Couplage apache avec 2 tomcat
    Par biozaxx dans le forum Apache
    Réponses: 3
    Dernier message: 18/02/2008, 11h27

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo