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

Tomcat et TomEE Java Discussion :

[Apache][TomCat] Problème avec mod_jk


Sujet :

Tomcat et TomEE Java

  1. #1
    Futur Membre du Club
    Profil pro
    Inscrit en
    Mai 2002
    Messages
    14
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2002
    Messages : 14
    Points : 9
    Points
    9
    Par défaut [resolu][Apache][TomCat] Problème avec mod_jk
    Salut j'ai installé le Apache 2.0.46 et tomcat 4.1.18 sur windows 98 et j'ai essayé de mettre en place le mod_jk_2.0.46.dll. J'ai suivis le tutoriel sur http://www.johnturner.com/howto/winxp-howto.html excepté que j'ai Apache 2.0.46 et non Apache 2.0.43 et que je suis sur windows 98.

    Mais la connection ne marche pas lorsque j'appelle une servlet par apache et j'obtient ceci:

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, web@monsite.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    More information about this error may be available in the server error log.

    Apache/2.0.46 (Win32) mod_jk/1.2.4 Server at localhost Port 80
    Dans le le log de catalina il y a:
    2003-06-19 13:31:17 Ajp13Connector[8009] Opening server socket on all host IP addresses
    2003-06-19 13:31:18 Ajp13Connector[8009] Starting background thread
    2003-06-19 13:31:18 Ajp13Processor[8009][0] Starting background thread
    2003-06-19 13:31:18 Ajp13Processor[8009][1] Starting background thread
    2003-06-19 13:31:18 Ajp13Processor[8009][2] Starting background thread
    2003-06-19 13:31:18 Ajp13Processor[8009][3] Starting background thread
    2003-06-19 13:31:18 Ajp13Processor[8009][4] Starting background thread
    et dans le log d'ereurs d'apache:


    [Thu Jun 19 13:32:27 2003] [notice] Parent: Created child process -1671693
    [Thu Jun 19 13:32:28 2003] [notice] Child -1671693: Child process is running
    [Thu Jun 19 13:32:28 2003] [notice] Child -1671693: Acquired the start mutex.
    [Thu Jun 19 13:32:28 2003] [notice] Child -1671693: Starting 250 worker threads.
    [Thu Jun 19 13:33:18 2003] [error] [client 127.0.0.1] client denied by server configuration: C:/tomcat/Tomcat4.1/webapps/examples/WEB-INF/
    [Thu Jun 19 13:33:32 2003] [error] [client 127.0.0.1] client denied by server configuration: C:/tomcat/Tomcat4.1/webapps/examples/WEB-INF/

  2. #2
    Rédacteur
    Avatar de lunatix
    Homme Profil pro
    Architecte technique
    Inscrit en
    Novembre 2002
    Messages
    1 960
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Architecte technique

    Informations forums :
    Inscription : Novembre 2002
    Messages : 1 960
    Points : 3 736
    Points
    3 736
    Par défaut
    pas facile de repondre comme ca, il manque bp d'info ...
    ceci dit, a priori, le repertoire su documentRoot d'apache ne devrais pas etre
    C:/tomcat/Tomcat4.1/webapps/examples/WEB-INF/
    mais plustot quelque chose comme
    C:/tomcat/Tomcat4.1/webapps/examples/
    ou
    C:/tomcat/Tomcat4.1/webapps/

    apache ne dois rien pouvoir aller chercher dans web-inf...

  3. #3
    Futur Membre du Club
    Profil pro
    Inscrit en
    Mai 2002
    Messages
    14
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2002
    Messages : 14
    Points : 9
    Points
    9
    Par défaut
    Pour ce qui est du :

    [Thu Jun 19 17:22:35 2003] [error] [client 127.0.0.1] client denied by server configuration: C:/tomcat/Tomcat4.1/webapps/examples/WEB-INF/
    Ca arrive lorsque j'accède au répertoire http://localhost/examples/ qui ne contient pas d'index (il liste fichiers et rep sauf WEB-INF).
    Je ne trouve pas de trace d'erreurs dans le log.

    D'ailleurs je peux parcourir le répertoire de l'application "examples" en tapant http://localhost/examples/images/...

    Mais si je demande http://localhost/examples/servlet/* (*=une servlet existante ou non) il me retoune Internal Server Error (cf premier msg).

    Que TOMCAT soit lancé ou pas ce sont le mêmes résultats !

  4. #4
    Rédacteur
    Avatar de lunatix
    Homme Profil pro
    Architecte technique
    Inscrit en
    Novembre 2002
    Messages
    1 960
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Architecte technique

    Informations forums :
    Inscription : Novembre 2002
    Messages : 1 960
    Points : 3 736
    Points
    3 736
    Par défaut
    t'as mis quoi dans la conf du mod jk, et le worker.properties ?

  5. #5
    Futur Membre du Club
    Profil pro
    Inscrit en
    Mai 2002
    Messages
    14
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2002
    Messages : 14
    Points : 9
    Points
    9
    Par défaut
    Dans C:\tomcat\Tomcat4.1\conf\jk\workers.properties
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
     
    # BEGIN workers.properties
    # Definition for Ajp13 worker
    worker.list=ajp13
    worker.ajp13.port=8009
    worker.ajp13.host=localhost
    worker.ajp13.type=ajp13
    # END workers.properties
    et dans C:\tomcat\Tomcat4.1\conf\auto\mod_jk.conf (qui a été écrit par TomCat)
    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
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
     
    ########## Auto generated on Thu Jun 19 17:43:49 CEST 2003##########
     
    <IfModule !mod_jk.c>
      LoadModule jk_module c:/apache/Apache2/modules/mod_jk_2.0.46.dll
    </IfModule>
     
    JkWorkersFile "C:/tomcat/Tomcat4.1/conf/jk/workers.properties"
    JkLogFile "C:/tomcat/Tomcat4.1/logs/mod_jk.log"
     
    JkLogLevel emerg
     
     
     
    <VirtualHost localhost>
        ServerName localhost
     
        #################### localhost:/admin ####################
     
        # Static files 
        Alias /admin "C:/tomcat/Tomcat4.1/webapps/../server/webapps/admin"
     
        <Directory "C:/tomcat/Tomcat4.1/webapps/../server/webapps/admin">
            Options Indexes FollowSymLinks
            DirectoryIndex index.html index.htm index.jsp 
        </Directory>
     
     
        # Deny direct access to WEB-INF and META-INF
        #
        <Location "/admin/WEB-INF/*">
            AllowOverride None
            deny from all
        </Location>
     
        <Location "/admin/META-INF/*">
            AllowOverride None
            deny from all
        </Location>
        #
        # Use Directory too. On Windows, Location doesn't work unless case matches
        #
        <Directory "C:/tomcat/Tomcat4.1/webapps/../server/webapps/admin/WEB-INF/">
            AllowOverride None
            deny from all
        </Directory>
     
        <Directory "C:/tomcat/Tomcat4.1/webapps/../server/webapps/admin/META-INF/">
            AllowOverride None
            deny from all
        </Directory>
     
        JkMount /admin/j_security_check  ajp13
        JkMount /admin/*.do  ajp13
        JkMount /admin/*.jsp  ajp13
     
        #################### localhost:/webdav ####################
     
        # Static files 
        Alias /webdav "C:/tomcat/Tomcat4.1/webapps/webdav"
     
        <Directory "C:/tomcat/Tomcat4.1/webapps/webdav">
            Options Indexes FollowSymLinks
            DirectoryIndex index.jsp index.html index.htm 
        </Directory>
     
     
        # Deny direct access to WEB-INF and META-INF
        #
        <Location "/webdav/WEB-INF/*">
            AllowOverride None
            deny from all
        </Location>
     
        <Location "/webdav/META-INF/*">
            AllowOverride None
            deny from all
        </Location>
        #
        # Use Directory too. On Windows, Location doesn't work unless case matches
        #
        <Directory "C:/tomcat/Tomcat4.1/webapps/webdav/WEB-INF/">
            AllowOverride None
            deny from all
        </Directory>
     
        <Directory "C:/tomcat/Tomcat4.1/webapps/webdav/META-INF/">
            AllowOverride None
            deny from all
        </Directory>
     
        JkMount /webdav/*.jsp  ajp13
     
        #################### localhost:/examples ####################
     
        # Static files 
        Alias /examples "C:/tomcat/Tomcat4.1/webapps/examples"
     
        <Directory "C:/tomcat/Tomcat4.1/webapps/examples">
            Options Indexes FollowSymLinks
            DirectoryIndex index.html index.htm index.jsp 
        </Directory>
     
     
        # Deny direct access to WEB-INF and META-INF
        #
        <Location "/examples/WEB-INF/*">
            AllowOverride None
            deny from all
        </Location>
     
        <Location "/examples/META-INF/*">
            AllowOverride None
            deny from all
        </Location>
        #
        # Use Directory too. On Windows, Location doesn't work unless case matches
        #
        <Directory "C:/tomcat/Tomcat4.1/webapps/examples/WEB-INF/">
            AllowOverride None
            deny from all
        </Directory>
     
        <Directory "C:/tomcat/Tomcat4.1/webapps/examples/META-INF/">
            AllowOverride None
            deny from all
        </Directory>
     
        JkMount /examples/jsp/security/protected/j_security_check  ajp13
        JkMount /examples/snoop  ajp13
        JkMount /examples/servlet/*  ajp13
        JkMount /examples/CompressionTest  ajp13
        JkMount /examples/*.jsp  ajp13
        JkMount /examples/servletToJsp  ajp13
        JkMount /examples/SendMailServlet  ajp13
     
        #################### localhost:/tomcat-docs ####################
     
        # Static files 
        Alias /tomcat-docs "C:/tomcat/Tomcat4.1/webapps/tomcat-docs"
     
        <Directory "C:/tomcat/Tomcat4.1/webapps/tomcat-docs">
            Options Indexes FollowSymLinks
            DirectoryIndex index.html index.htm index.jsp 
        </Directory>
     
     
        # Deny direct access to WEB-INF and META-INF
        #
        <Location "/tomcat-docs/WEB-INF/*">
            AllowOverride None
            deny from all
        </Location>
     
        <Location "/tomcat-docs/META-INF/*">
            AllowOverride None
            deny from all
        </Location>
        #
        # Use Directory too. On Windows, Location doesn't work unless case matches
        #
        <Directory "C:/tomcat/Tomcat4.1/webapps/tomcat-docs/WEB-INF/">
            AllowOverride None
            deny from all
        </Directory>
     
        <Directory "C:/tomcat/Tomcat4.1/webapps/tomcat-docs/META-INF/">
            AllowOverride None
            deny from all
        </Directory>
     
        JkMount /tomcat-docs/*.jsp  ajp13
     
        #################### localhost:/servlets ####################
     
        # Static files 
        Alias /servlets "C:/image-chat/serveur/servlets"
     
        <Directory "C:/image-chat/serveur/servlets">
            Options Indexes FollowSymLinks
            DirectoryIndex index.html 
        </Directory>
     
     
        # Deny direct access to WEB-INF and META-INF
        #
        <Location "/servlets/WEB-INF/*">
            AllowOverride None
            deny from all
        </Location>
     
        <Location "/servlets/META-INF/*">
            AllowOverride None
            deny from all
        </Location>
        #
        # Use Directory too. On Windows, Location doesn't work unless case matches
        #
        <Directory "C:/image-chat/serveur/servlets/WEB-INF/">
            AllowOverride None
            deny from all
        </Directory>
     
        <Directory "C:/image-chat/serveur/servlets/META-INF/">
            AllowOverride None
            deny from all
        </Directory>
     
        JkMount /servlets/pub  ajp13
        JkMount /servlets/gestion  ajp13
        JkMount /servlets/*.jsp  ajp13
     
        #################### localhost:/manager ####################
     
        # Static files 
        Alias /manager "C:/tomcat/Tomcat4.1/webapps/../server/webapps/manager"
     
        <Directory "C:/tomcat/Tomcat4.1/webapps/../server/webapps/manager">
            Options Indexes FollowSymLinks
            DirectoryIndex index.html index.htm index.jsp 
        </Directory>
     
     
        # Deny direct access to WEB-INF and META-INF
        #
        <Location "/manager/WEB-INF/*">
            AllowOverride None
            deny from all
        </Location>
     
        <Location "/manager/META-INF/*">
            AllowOverride None
            deny from all
        </Location>
        #
        # Use Directory too. On Windows, Location doesn't work unless case matches
        #
        <Directory "C:/tomcat/Tomcat4.1/webapps/../server/webapps/manager/WEB-INF/">
            AllowOverride None
            deny from all
        </Directory>
     
        <Directory "C:/tomcat/Tomcat4.1/webapps/../server/webapps/manager/META-INF/">
            AllowOverride None
            deny from all
        </Directory>
     
        JkMount /manager/html/*  ajp13
        JkMount /manager/*  ajp13
        JkMount /manager/*.jsp  ajp13
    </VirtualHost>


    voila aussi ce j'ai rajouté dans TOMCAT_HOME\conf\Server.xml:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
     
    <server...>
    <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" modJk="c:/apache/Apache2/modules/mod_jk_2.0.46.dll" />
    ....
    <host...>
    <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" append="true" forwardAll="false" modJk="c:/apache/Apache2/modules/mod_jk_2.0.46.dll" />

    Dans APACHE_HOME\conf\httpd.conf

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    LoadModule jk_module modules/mod_jk_2.0.46.dll 
    Include c:/tomcat/tomcat4.1/conf/auto/mod_jk.conf
    J'ai essayé d'activer ou de desactiver les connectors dans TOMCAT_HOME\conf\Server.xml :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
    <Connector....</Connector>
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <!--<Connector....</Connector>-->
    (Coyote/JK2 AJP 1.3 Connector était activé initialement)

  6. #6
    Futur Membre du Club
    Profil pro
    Inscrit en
    Mai 2002
    Messages
    14
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2002
    Messages : 14
    Points : 9
    Points
    9
    Par défaut
    L problème est résolu en fait lorsque j'allais sur la page d' admin et que je modifier des paramètres, le fichier server.xml était mal réécris, ce qui changeait la conf.

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

Discussions similaires

  1. Réponses: 15
    Dernier message: 12/02/2010, 12h55
  2. Couplage Apache Tomcat, configuration du mod_jk
    Par skulled dans le forum Tomcat et TomEE
    Réponses: 1
    Dernier message: 26/03/2009, 10h31
  3. [Tomcat] problème avec Tomcat5.5
    Par soumou dans le forum Tomcat et TomEE
    Réponses: 3
    Dernier message: 17/02/2006, 21h33
  4. [Tomcat] Problème avec web.xml
    Par hichamus dans le forum Eclipse Java
    Réponses: 2
    Dernier message: 01/03/2005, 16h57
  5. [Tomcat]Problème avec Tomcat
    Par agbere dans le forum Tomcat et TomEE
    Réponses: 6
    Dernier message: 03/06/2004, 08h30

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