VHost Log files not working

This is a discussion on VHost Log files not working within the Apache Web Server forums, part of the Web Server and Related Forums category; I have vhosts defined as below but have not been able to get the site log files to work. Any ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-15-2004
James Pearson
 
Posts: n/a
Default VHost Log files not working

I have vhosts defined as below but have not been able to get the site
log files to work. Any and all log msgs are being saved in the root log
files. I have tried using various paths to get the vhost logs to save
in the vhost files but have not been able to.

Things I have tried are:
ErrorLog d:/www/Capri/logs/error.log #apache won't start
CustomLog d:/www/Capri/logs/access.log common #apache won't start
ErrorLog www/Capri/logs/error.log
CustomLog www/Capri/logs/access.log common
ErrorLog /Capri/logs/error.log
CustomLog /Capri/logs/access.log common
ErrorLog Capri/logs/error.log
CustomLog Capri/logs/access.log common

Thanks for your help.
Jim

My apache install and vhost cfg are:

Apache/2.0.52 (Win32) mod_ssl/2.0.52 OpenSSL/0.9.7e PHP/5.0.2 Server

NameVirtualHost 192.168.123.102:80

<VirtualHost 192.168.123.102:80>
ServerAdmin Administrator@jim.dynalias.net
DocumentRoot d:/www/
ServerName jim.dynalias.net
ServerAlias localhost
ErrorLog logs/error.log
CustomLog logs/access.log common
</VirtualHost>

<VirtualHost 192.168.123.102:80>
ServerAdmin Administrator@jim.dynalias.net
DocumentRoot d:/www/Capri/
ServerName jim.dynalias.net
ServerAlias capri
ErrorLog logs/error.log
CustomLog logs/access.log common
</VirtualHost>

<VirtualHost 192.168.123.102:80>
ServerAdmin Administrator@jim.dynalias.net
DocumentRoot d:/www/websales/
ServerName websales.jim.dynalias.net
ServerAlias websales
ErrorLog logs/error.log
CustomLog logs/access.log common
</VirtualHost>

NameVirtualHost 192.168.123.102:443

<VirtualHost 192.168.123.102:443>
ServerAdmin Administrator@jim.dynalias.net
DocumentRoot d:/www/websales/
ServerName websales.jim.dynalias.net
ServerAlias websales
ErrorLog logs/error.log
CustomLog logs/access.log common
</VirtualHost>
  #2 (permalink)  
Old 12-15-2004
HansH
 
Posts: n/a
Default Re: VHost Log files not working

"James Pearson" <cty76220@centurytel.net> schreef in bericht
news:XtednVaOyYJPMyLcRVn-jQ@centurytel.net...
> I have vhosts defined as below but have not been able to get the site
> log files to work. Any and all log msgs are being saved in the root log
> files. I have tried using various paths to get the vhost logs to save
> in the vhost files but have not been able to.
> ServerAlias websales
> ErrorLog logs/error.log

http://httpd.apache.org/docs-2.0/mod...html#errorlog:
If the file-path is not absolute then it is assumed to be relative to the
ServerRoot.

HansH



  #3 (permalink)  
Old 12-16-2004
Jim Pearson
 
Posts: n/a
Default Re: VHost Log files not working

Hans,

Thank-you for your response. I see from reading that bit of
documentation that I need to remove the trailing slash from the docroot
lines so I have the following:

DocumentRoot d:/www/capri
ErrorLog logs/error.log
CustomLog logs/access.log common

If I understand the documentation correctly the lines below would
produce the following paths to the log files:

d:/www/capri/logs/error.log
d:/www/capri/access.log common

Would this be correct?

Jim

HansH wrote:
> http://httpd.apache.org/docs-2.0/mod...html#errorlog:
> If the file-path is not absolute then it is assumed to be relative to the
> ServerRoot.
>
> HansH


  #4 (permalink)  
Old 12-16-2004
HansH
 
Posts: n/a
Default Re: VHost Log files not working

"Jim Pearson" <cty76220@centurytel.net> schreef in bericht
news:56OdneSC1PhS6VzcRVn-1g@centurytel.net...
> HansH wrote:
> > http://httpd.apache.org/docs-2.0/mod...html#errorlog:
> > If the file-path is not absolute then it is assumed to be relative to

the
> > ServerRoot.

> Thank-you for your response. I see from reading that bit of
> documentation that I need to remove the trailing slash from the docroot
> lines so I have the following:
> DocumentRoot d:/www/capri
> ErrorLog logs/error.log
> CustomLog logs/access.log common
>
> If I understand the documentation correctly the lines below would
> produce the following paths to the log files:
> d:/www/capri/logs/error.log
> d:/www/capri/access.log common

Cann't tell, documentroot is not the same as serverroot.
http://httpd.apache.org/docs-2.0/mod...tml#serverroot
http://httpd.apache.org/docs-2.0/mod...l#documentroot

HansH


  #5 (permalink)  
Old 12-16-2004
James Pearson
 
Posts: n/a
Default Re: VHost Log files not working

Hans,

Well, then I have a bigger problem than I want because my serverroot is:

ServerRoot "C:/ApacheGroup/Apache2"

If I make the paths absoulte as below then Apache will not start:

ErrorLog d:/www/Capri/logs/error.log
CustomLog d:/www/Capri/logs/access.log common

How does one get the log files for each vhost to work on a different
drive than the server has for root?

I suppose I could do the following to break out the log files for the
different vhosts:

ErrorLog logs/caprierror.log
CustomLog logs/capriaccess.log common

Doing that though would not allow other users access to the log files
because they have no access to drive C where the server root is.

Again - Thank-you,
Jim

HansH wrote:
> Cann't tell, documentroot is not the same as serverroot.
> http://httpd.apache.org/docs-2.0/mod...tml#serverroot
> http://httpd.apache.org/docs-2.0/mod...l#documentroot
>
> HansH

  #6 (permalink)  
Old 12-17-2004
HansH
 
Posts: n/a
Default Re: VHost Log files not working

"James Pearson" <cty76220@centurytel.net> schreef in bericht
news:esKdnSa5QZmYhl_cRVn-ug@centurytel.net...
> HansH wrote:
> > Cann't tell, documentroot is not the same as serverroot.
> > http://httpd.apache.org/docs-2.0/mod...tml#serverroot
> > http://httpd.apache.org/docs-2.0/mod...l#documentroot

> Well, then I have a bigger problem than I want because my serverroot is:
> ServerRoot "C:/ApacheGroup/Apache2"
> If I make the paths absoulte as below then Apache will not start:

No problems while testing for you using Apache 2.0.50 .

> ErrorLog d:/www/Capri/logs/error.log
> CustomLog d:/www/Capri/logs/access.log common

Did you create all folder along the path ??
Start apache from the command line and observe the errors reported.

HansH





  #7 (permalink)  
Old 12-17-2004
James Pearson
 
Posts: n/a
Default Re: VHost Log files not working

Hans

Thank you for your help here. I have no idea what is different now but
it has started working now the way I intended it to work. Log files
have been created and accessed in each virtual host directory as I
wanted. I simply used the lines as follows:

ErrorLog d:/www/Capri/logs/error.log
CustomLog d:/www/Capri/logs/access.log common

I have tried that before! I know I have and the server wouldn't start.
Paths were all there before just no log files were being created.

Thanks again for all your help.

Jim

HansH wrote:
> Did you create all folder along the path ??
> Start apache from the command line and observe the errors reported.
>
> HansH

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:43 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0