public_html : need help

Hello,

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://207.150.178.13/~boutired/ doesn’t work but
but
http://207.150.178.12/~boutired/ works fine (and a lot of others like http://207.150.178.92/~boutired/ http://207.150.178.93/~boutired/ http://207.150.178.94/~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://207.150.178.13/~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

UserDir public_html

Control access to UserDir directories. The following is an example

for a site where these directories are restricted to read-only.

#<Directory /home/*/public_html>

AllowOverride FileInfo AuthConfig Limit Indexes

<Limit GET POST OPTIONS PROPFIND>

Order allow,deny

Allow from all

</Limit>

<LimitExcept GET POST OPTIONS PROPFIND>

Order deny,allow

Deny from all

</LimitExcept>

#</Directory>

the default value in fact.

and in php.ini the UserDir is empty
UserDir =

Any idea ? it’s a real pbms for us.

Thanks for your help

Pascal

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://1.2.3.4/~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)

Socheat

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

pascal

Those are good questions Pascal :slight_smile: Questions I could better answer if the Apache site were up right now… :slight_smile:

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.

Socheat

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://1.2.3.4/~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

<VirtualHost default:80>

General setup for the virtual host

ErrorLog /etc/httpd/logs/error_log
TransferLog /etc/httpd/logs/access_log
</VirtualHost>

and it is ok

But still not with this $*#!!! ip .13 all others are just fine, not this one :\ grrrr !!!

:slight_smile:

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

Pascal