httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cox, Charlie" <>
Subject [users@httpd] virtual host problem
Date Fri, 23 Apr 2004 19:05:26 GMT
Versions: Apache 2.0.49/jk2.0.4

I have named virtual hosts set up and that is working ok. 

DocumentRoot /myroot
ErrorLog "| cronolog.exe /mylogs/main_error.log

    DocumentRoot /foo/bar
    DirectoryIndex index.html
    CustomLog "| cronolog.exe /mylogs/foobar_access.log" combined
    ErrorLog "| cronolog.exe /mylogs/foobar_error.log
    <Directory /foo/bar>
        Options -Indexes -FollowSymLinks
        AllowOverride None

However I have no virtual host set up when a host name is not
provided( But somehow the error of 'directory index
denied for /' gets logged to the foobar_error.log instead of the main error
log. However the request is not logged to foobar_access.log. 

One more thing is that I am using mod_jk2 and requests to the domain name
for *.html are sent to tomcat. However it is not doing that for the
ipaddress request because I have not defined*.html in the I understand and expect this jk2 behavior. 
However, if I place an index.html in /foo/bar then the request to will pick it up instead of using the 'main' document root.

I think that I need a block like the following to redirect any other
requests to my virtual host: 

	ServerName default:80
	#do whatever

My real interest is in understanding what is going on here. I want to know
why this behavior is inconsistent as to when it uses the virtual host vs.
the main settings. My understanding was that a whole request(not just a
directive) either matches a <VirutalHost> or it uses the 'main' settings. Is
this a wrong assumption? 


View raw message