You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Loïc Lefèvre <ll...@fivia.com> on 2001/07/26 18:01:06 UTC

Tomcat VHost configuration under Linux

Hi
After 3 days passed on the configuration of Apache 1.3.12+Tomcat 3.2.3
(mod_jk)
I'm going mad !!! :( Could someone please send me their configuration files
(mod_jk.conf + server.xml + web.xml (tomcat + appli)). Note: the files for a
web archive which work !

After that, I'm going to work in source files >:)

Loïc Lefèvre


RE: RE: Tomcat VHost configuration under Linux

Posted by Loïc Lefèvre <ll...@fivia.com>.
Thanks for yhis but as the subject said, I'm interesting in VirtualHost
configuration. I use Apache 1.3.12 + Tomcat 3.2.3 + mod_jk + mod_rewrite

At this point, I've got in mod_jk.log:

--- start of mod_jk.log ---

[jk_uri_worker_map.c (345)]: Into jk_uri_worker_map_t::map_uri_to_worker
[jk_uri_worker_map.c (435)]: jk_uri_worker_map_t::map_uri_to_worker, done
without a match
[jk_uri_worker_map.c (345)]: Into jk_uri_worker_map_t::map_uri_to_worker
[jk_uri_worker_map.c (407)]: jk_uri_worker_map_t::map_uri_to_worker, Found a
match ajp12
[jk_worker.c (123)]: Into wc_get_worker_for_name ajp12
[jk_worker.c (127)]: wc_get_worker_for_name, done  found a worker
[jk_ajp12_worker.c (223)]: Into jk_worker_t::get_endpoint
[jk_ajp12_worker.c (121)]: Into jk_endpoint_t::service
[jk_connect.c (108)]: Into jk_open_socket
[jk_connect.c (115)]: jk_open_socket, try to connect socket = 6
[jk_connect.c (124)]: jk_open_socket, after connect ret = 0
[jk_connect.c (132)]: jk_open_socket, set TCP_NODELAY to on
[jk_connect.c (140)]: jk_open_socket, return, sd = 6
[jk_ajp12_worker.c (134)]: In jk_endpoint_t::service, sd = 6
[jk_ajp12_worker.c (357)]: Into ajpv12_handle_request
[jk_ajp12_worker.c (361)]: ajpv12_handle_request, sending the ajp12 start
sequence
[jk_ajp12_worker.c (413)]: ajpv12_handle_request, sending the headers
[jk_ajp12_worker.c (432)]: ajpv12_handle_request, sending the terminating
mark
[jk_ajp12_worker.c (477)]: ajpv12_handle_request done
[jk_ajp12_worker.c (148)]: In jk_endpoint_t::service, sent request
[jk_ajp12_worker.c (493)]: Into ajpv12_handle_response
[jk_ajp12_worker.c (507)]: ajpv12_handle_response, read Status: 404 Not
Found
[jk_ajp12_worker.c (535)]: ajpv12_handle_response, read Status=404 Not Found
[jk_ajp12_worker.c (507)]: ajpv12_handle_response, read Content-Type:
text/html
[jk_ajp12_worker.c (535)]: ajpv12_handle_response, read
Content-Type=text/html
[jk_ajp12_worker.c (547)]: ajpv12_handle_response, allocating header arrays
[jk_ajp12_worker.c (507)]: ajpv12_handle_response, read Content-Length: 188
[jk_ajp12_worker.c (535)]: ajpv12_handle_response, read Content-Length=188
[jk_ajp12_worker.c (507)]: ajpv12_handle_response, read Servlet-Engine:
Tomcat Web Server/3.2.3 (JSP 1.1; Servlet 2.2; Java 1.3.0; Linux 2.2.16-22
x86; java.vendor=IBM Corporation)
[jk_ajp12_worker.c (535)]: ajpv12_handle_response, read
Servlet-Engine=Tomcat Web Server/3.2.3 (JSP 1.1; Servlet 2.2; Java 1.3.0;
Linux 2.2.16-22 x86; java.vendor=IBM Corporation)
[jk_ajp12_worker.c (507)]: ajpv12_handle_response, read
[jk_ajp12_worker.c (509)]: ajpv12_handle_response, headers are done
[jk_ajp12_worker.c (568)]: ajpv12_handle_response, starting response
[jk_ajp12_worker.c (579)]: ajpv12_handle_response, reading response body
[jk_ajp12_worker.c (595)]: ajpv12_handle_response, response body is done
[jk_ajp12_worker.c (607)]: ajpv12_handle_response done
[jk_ajp12_worker.c (163)]: Into jk_endpoint_t::done

--- end of mod_jk.log ---

for these settings:

--- start of server.xml ---

<Host name="lol.fivia.com">
           <Context path=""
                    docBase="webapps/lol"
                    debug="5"
                    reloadable="true"
                    crossContext="false"
                    trusted="false">
           </Context>
</Host>

--- end of server.xml ---

--- start of web.xml ---
<web-app>
    <servlet>
        <servlet-name>AdFront</servlet-name>
        <servlet-class>com.fivia.adfront.sales.AdFront</servlet-class>
    </servlet>
    <servlet-mapping>
    	<servlet-name>AdFront</servlet-name>
        <url-pattern>/*</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>30</session-timeout>
    </session-config>
</web-app>

--- end of web.xml ---

--- start of mod_jk.conf --- (not -auto)

NameVirtualHost 192.1.1.128

<VirtualHost 192.1.1.128>
ServerName lol.fivia.com
DocumentRoot /usr/local/tomcat/jakarta-tomcat-3.2.3/webapps/lol

JkMount /lol/* ajp12
JkMount /*.jsp ajp12

RedirectMatch /index.html $1/start/index.html

ErrorLog /usr/local/tomcat/log/lol_error_html.log
TransferLog /usr/local/tomcat/log/lol_access_html.log

RewriteEngine on
RewriteLog /usr/local/tomcat/log/lol_rewrite.log
RewriteLogLevel 9

RewriteCond %{REQUEST_URI} ^/servlet* [NC]
RewriteRule ^/servlet/(.*) /lol/$1 [PT]

RewriteCond %{REQUEST_URI} !^/lol* [NC]
RewriteCond %{REQUEST_URI} !^/Image* [NC]
RewriteCond %{REQUEST_URI} !^/Elemtech* [NC]
RewriteCond %{REQUEST_URI} !^/Erreur* [NC]
RewriteCond %{REQUEST_URI} ^/.*/.*
RewriteRule ^/(.*) /lol/AdFront?access=/$1 [PT,QSA]

</VirtualHost>

--- end of mod_jk.conf ---

--- start of lol_access_html.log ---

192.1.1.33 - - [27/Jul/2001:11:07:49 +0200] "GET / HTTP/1.1" 302 279
192.1.1.33 - - [27/Jul/2001:11:07:49 +0200] "GET /start/index.html HTTP/1.1"
404 188

--- end of lol_access_html.log ---

--- start of lol_rewrite.log ---

(2) init rewrite engine with requested uri /
(3) applying pattern '^/servlet/(.*)' to uri '/'
(3) applying pattern '^/(.*)' to uri '/'
(4) RewriteCond: input='/' pattern='!^/lol*' => matched
(4) RewriteCond: input='/' pattern='!^/Image*' => matched
(4) RewriteCond: input='/' pattern='!^/Elemtech*' => matched
(4) RewriteCond: input='/' pattern='!^/Erreur*' => matched
(4) RewriteCond: input='/' pattern='^/.*/.*' => not-matched
(1) pass through /
(2) init rewrite engine with requested uri /index.html
(3) applying pattern '^/servlet/(.*)' to uri '/index.html'
(3) applying pattern '^/(.*)' to uri '/index.html'
(4) RewriteCond: input='/index.html' pattern='!^/lol*' => matched
(4) RewriteCond: input='/index.html' pattern='!^/Image*' => matched
(4) RewriteCond: input='/index.html' pattern='!^/Elemtech*' => matched
(4) RewriteCond: input='/index.html' pattern='!^/Erreur*' => matched
(4) RewriteCond: input='/index.html' pattern='^/.*/.*' => not-matched
(1) pass through /index.html
(2) init rewrite engine with requested uri /start/index.html
(3) applying pattern '^/servlet/(.*)' to uri '/start/index.html'
(3) applying pattern '^/(.*)' to uri '/start/index.html'
(4) RewriteCond: input='/start/index.html' pattern='!^/lol*' => matched
(4) RewriteCond: input='/start/index.html' pattern='!^/Image*' => matched
(4) RewriteCond: input='/start/index.html' pattern='!^/Elemtech*' => matched
(4) RewriteCond: input='/start/index.html' pattern='!^/Erreur*' => matched
(4) RewriteCond: input='/start/index.html' pattern='^/.*/.*' => matched
(2) rewrite /start/index.html -> /lol/AdFront?access=/start/index.html
(3) split uri=/lol/AdFront?access=/start/index.html -> uri=/lol/AdFront,
args=access=/start/index.html
(2) forcing '/lol/AdFront' to get passed through to next API URI-to-filename
handler

--- end of lol_rewrite.log ---

For these results, I just try to access http://lol.fivia.com from a work
station. Apache + tomcat is on
a Linux server (redhat, kernel v2.2.16-22).

I think the problem come from server.xml and/or web.xml but I can't find it
:(

So any idea? url? faq to refer to?
If you need some explanation about the rewrite rules, no problem...
I have to make tomcat work !

Loïc Lefèvre

-----Message d'origine-----
De : John Hebert [mailto:john@vedalabs.com]
Envoyé : jeudi 26 juillet 2001 21:39
À : tomcat-user@jakarta.apache.org
Objet : Re: <HELP>Tomcat VHost configuration under Linux</HELP>


Loïc Lefèvre wrote:

> Hi
> After 3 days passed on the configuration of Apache 1.3.12+Tomcat 3.2.3
> (mod_jk)
> I'm going mad !!! :( Could someone please send me their configuration
files
> (mod_jk.conf + server.xml + web.xml (tomcat + appli)). Note: the files for
a
> web archive which work !
>
> After that, I'm going to work in source files >:)
>
> Loïc Lefèvre
>
>



--
John Alex Hebert
john@vedalabs.com
System Engineer



Re: Tomcat VHost configuration under Linux

Posted by John Hebert <jo...@vedalabs.com>.
Loïc Lefèvre wrote:

> Hi
> After 3 days passed on the configuration of Apache 1.3.12+Tomcat 3.2.3
> (mod_jk)
> I'm going mad !!! :( Could someone please send me their configuration files
> (mod_jk.conf + server.xml + web.xml (tomcat + appli)). Note: the files for a
> web archive which work !
> 
> After that, I'm going to work in source files >:)
> 
> Loïc Lefèvre
> 
> 



-- 
John Alex Hebert
john@vedalabs.com
System Engineer