We have a really strange situation here.
When a user try to see his web pages by using the public_html depending on the IP adress he use, it works or not (when it doesn’t works there is only a blank page, that’s all).
More, in this case, the logs error.log and transfer.log of this domain seems to be writen in the first vhost found. So we had to create a 000-logs.com siteworx account to put there all losted logs (all the logs of users whom get their web pages using the http://ip/~account/)
ok for example
http://22.214.171.124/~boutired/ doesn’t work but
http://126.96.36.199/~boutired/ works fine (and a lot of others like http://188.8.131.52/~boutired/ http://184.108.40.206/~boutired/ http://220.127.116.11/~boutired/ etc…)
If we look at the log they are in our /home/zerozero/var/000-logs.com/logs/error.log
But whay I’m saying is not true in all cases. For example here is a new account just created : http://18.104.22.168/~boutire1/ and here it’s work for this IP (but most the time it doesn’t)
This IP is a shared one. But all others for whom it works are both shared or dedicated !
Here is our httpd.conf
Control access to UserDir directories. The following is an example
for a site where these directories are restricted to read-only.
AllowOverride FileInfo AuthConfig Limit Indexes
<Limit GET POST OPTIONS PROPFIND>
Allow from all
<LimitExcept GET POST OPTIONS PROPFIND>
Deny from all
the default value in fact.
and in php.ini the UserDir is empty
Any idea ? it’s a real pbms for us.
Thanks for your help
That is actually correct behavior Pascal. When using Name-based VirtualHosts, you need to have the domain name in the URL, otherwise Apache won’t know which VirtualHost to serve up. So, when you use http://22.214.171.124/~account/, while the pages served up will be the ~account site, the logging will occur in the default VirtualHost (since Apache doesn’t know any better)
Thanks Socheat, I understand this about the logs.
So basicly it should best to create a default vhost for port 80 rather use our 000-logs
Something like this
<VirtualHost Default:80> shoud do the job ? and in this case route all logs in current /var/log/httpd ?
In fact it’s this I do not understand. In our main httpd file we have defined defaumt location for error.log and others log to /var/log/httpd so why Apache doesn"t use this one rather choose a default vhost when it doesn’t find a vhost.
AnyWay we will try the default:80 it should be a solution to most of our pbms indeed. I don’t know why but we have a lot of clients that use the public_html and after they complain for example that SSI doesn’t work. Which is normal as there isn’t a +options Includes. So with default :80 we could set our default settings for ALL vhosts (like SSI for shtml and html with the XbitHack On). More you ghive me an idea. We had some pbm with Tomcat with also public_html, now if the default vhost default:80 works it would also be fine : Great
But one question remaind, what about the IP who doesn’t work ? and others does ? any idea about this, it"s really strange
Those are good questions Pascal Questions I could better answer if the Apache site were up right now…
I’m sure it’s some obscure (or not so obscure) detail in how VirtualHosts work, but without being able to get to the docs and without knowing how you have your sites setup, I can’t confirm for sure.
Lol Socheat before asking there I also tried to get the doc from Apache…
In fact I’m pretty sure that <VirtualHost default:80> is used as the default setting for all incoming request for protocol HTTP on port 80, exactly as you setup the ssl.conf which have a <VirtualHost default:443> who define the default SSL
I’ve done some tests using http://126.96.36.199/~account/toto.php . toto.php doesn’t exist and I have the log now in /var/log/httpd/error_log rather the first vhost defined log dir. So it seems to be as it worked
I’ve just setuped a default.conf in conf.d/ with
General setup for the virtual host
and it is ok
But still not with this $*#!!! ip .13 all others are just fine, not this one :\ grrrr !!!
Nobody has an idea of why this ip doesn’t accept user_dir incoming request ?
We use the default httpd/iworx conf + mod_security + ssi enabled in httpd.conf and now this default.conf, but that’s all, all others settings are default