Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache2 virtual hosts not logging
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
trossachs
Veteran
Veteran


Joined: 22 Jan 2004
Posts: 1204
Location: London

PostPosted: Tue Oct 05, 2004 11:57 am    Post subject: Apache2 virtual hosts not logging Reply with quote

I have various virtual hosts, but since September 24, only the primary, first one is reporting anything in the logs.

First VH:

Code:

<VirtualHost>
        ServerAdmin webmaster@foo1
#        DocumentRoot /usr/html/foo1
        ServerName gandalf.foo1
        ServerAlias foo1 *.foo1
        Errorlog /var/log/apache2/foo1-error_log
        CustomLog /var/log/apache2/foo1-access_log common
</VirtualHost>



Second VH:

Code:

<VirtualHost>
        ServerAdmin webmaster@foo2
        DocumentRoot /usr/html/foo2
        ServerAlias foo2 *.foo2
        ServerName gandalf.foo2
        ErrorLog /var/log/apache2/foo2-error_log
        CustomLog /var/log/apache2/foo2-access_log common
</VirtualHost>


You may assume that both domain names are FQDN, just shortened for this post. Any ideas as to where I might be going wrong?
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Tue Oct 05, 2004 12:02 pm    Post subject: Reply with quote

Is reporting anything in the logs, like: is the only one actually running ?
Are the others running or not ?

If not, you may have screwed up the NameVirtualHost definition.

Also check permissions on those dirs and stuff - but you should know all that.
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
trossachs
Veteran
Veteran


Joined: 22 Jan 2004
Posts: 1204
Location: London

PostPosted: Tue Oct 05, 2004 12:27 pm    Post subject: Reply with quote

Thanks for this adaptr, but the permissions are correct. What should I check with the NameVirtualHost definition? There is an error ref:

Code:

.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable


... but when I check the locaiton of this file above, it does not exist within the named virtual host. The above error is listed within the error log of Foo1 but bears reference to Foo2.
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Tue Oct 05, 2004 1:53 pm    Post subject: Reply with quote

What should you check in regard to the virtualhost definition ?
Well, whether you have one, for starters...

And the htaccess error is merely a notice that the file is not accessible - it need not exist, and does not in this case.
So this does indicate a directory permission problem.
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
trossachs
Veteran
Veteran


Joined: 22 Jan 2004
Posts: 1204
Location: London

PostPosted: Tue Oct 05, 2004 4:03 pm    Post subject: Reply with quote

I must be missing a screw or something. The VH definitions do exist and I have not changed anything since when they were first created. The only thing I have done today is to comment out the "conf/vhosts.conf" line and added the above two VH listings directly into the httpd.conf file. I am able to view the sites from the internal network but not from outside.

And BEFORE you say I must have router or network problems, this is not so because there are ln -s links within Foo2 which work outside the local network and are available to use. I have people in two different countries accessing webmail which also sits on this box via Postfix. The only other thing I will say is that there are now two additional files which are reporting:

Code:

error_log
access_log


And these sit in /var/log/apache2 along with the error and access logs for each of the virtual hosts listed there also. But nothing get's printed in the VH logs but only in these new default ones. Is there some directive or line in httpd.conf and commonapache2.conf which is pointing to these two files which I can take out?
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Wed Oct 06, 2004 2:43 pm    Post subject: Reply with quote

Are reporting what ?
Do you mean these files are created and there is error reporting in them, or do you mean these lines are reported in some other file ?

If the former, what is in these files ?
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum