First thing I would do is drop the wildcard from ServerAlias. There's a very good chance that's an Apache thing...that doesn't necessarily mean that Tomcat accepts it.
Since your Tomcat instance serves all the requests correctly, the culprit is Apache not passing the correct host header to Tomcat (or rather, the host header that Tomcat needs to see). This may or may not be a mod_jk issue, too.
Also, do you have Apache's NameVirtualHost directive enabled?
John
On Tue, 3 Jun 2003 10:38:54 +0200 (CEST), Niklas Saers Mailinglistaccount <[EMAIL PROTECTED]> wrote:
Hi,
I'm running a webserver with many virtual hosts. The default virtualhost
is the registrar.no virtualhost that has a serveralias to www.registrar.no
I issue the following requests:
http://registrar.no/servlets/servlet/no.registrar.servlets.LagEndreDnsKnapper
http://www.registrar.no/servlets/servlet/no.registrar.servlets.LagEndreDnsKnapper
http://192.168.1.10/servlets/servlet/no.registrar.servlets.LagEndreDnsKnapper
In my logfile I get:
192.168.0.44 - - [03/Jun/2003:10:28:14 +0200] "GET /servlets/servlet/no.registrar.servlets.LagEndreDnsKnapper HTTP/1.1" 404 839 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
192.168.0.44 - - [03/Jun/2003:10:28:19 +0200] "GET /servlets/servlet/no.registrar.servlets.LagEndreDnsKnapper HTTP/1.1" 404 839 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
192.168.0.44 - - [03/Jun/2003:10:28:40 +0200] "GET /servlets/servlet/no.registrar.servlets.LagEndreDnsKnapper HTTP/1.1" 200 0 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
Why do I get a 404 on the two first ones while I get a 200 on the last? The 404 is generated by Tomcat, so it's obvious that Tomcat kicks in. While the AJP runs on port 11143, I have a HTTP server instance (from the same server.xml file) running on port 41143. When I do
http://registrar.no:41143/servlets/servlet/no.registrar.servlets.LagEndreDnsKnapper
http://www.registrar.no:41143/servlets/servlet/no.registrar.servlets.LagEndreDnsKnapper
http://192.168.1.10:41143/servlets/servlet/no.registrar.servlets.LagEndreDnsKnapper
they all produce the correct output.
My server is Apache/2.0.46 (Unix) DAV/2 mod_jk2/2.0.3-dev PHP/4.3.1 mod_python/3.0.3 Python/2.2.2 mod_ssl/2.0.46 OpenSSL/0.9.7a with Tomcat 4.1.24
My virtualhost is:
<VirtualHost *:80> ServerAdmin [EMAIL PROTECTED] ServerName registrar.no ServerAlias *.registrar.no DocumentRoot /home/no/regis_7 CustomLog /var/log/weblogs/registrar.no/access_log combined ErrorLog /var/log/weblogs/registrar.no/error_log <Directory /home/no/regis_7> Options ExecCGI Includes RLimitCPU 5 5 RLimitMEM 6000000 6000000 RLimitNPROC 10 10 </Directory> <Location /> php_admin_value doc_root /home/no/regis_7/ php_admin_value user_dir /home/no/regis_7/ php_admin_value open_basedir "/home/no/regis_7/:/usr/local/lib/php/" php_admin_value error_log /var/log/weblogs/registrar.no/php_error php_admin_value register_globals On php_admin_value upload_tmp_dir /home/no/regis_7/tmp php_admin_value from [EMAIL PROTECTED] php_admin_value safe_mode Off </Location> SuexecUserGroup regis_7 ftpchroot
<Location "/*.jsp"> JkUriSet worker ajp13:localhost:11143 </Location>
<Location "/webapps"> JkUriSet worker ajp13:localhost:11143 </Location>
<Location "/servlet"> JkUriSet worker ajp13:localhost:11143 </Location>
<Location "/servlets/*"> JkUriSet worker ajp13:localhost:11143 </Location>
</VirtualHost>
Thanks in advance for helping me figuring out this 404.
Cheers
Nik
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
