Computer House Home PageList of products and servicesDrivers, Utilities, Info and More!Learn more about Computer House

 How do I create logs for my Virtual Host?

 
Answer
 
To create Error and Transfer (Access) Logs for your virtual hosts you will need to do the following:

  1. FTP into your virtual server.

  2. After logging into FTP, you would go to your "/www/conf/" directory and download the "httpd.conf" file (ASCII mode).

  3. At the end of the 'httpd.conf' file you will find one (1) block for each of your virtual hosts.




  4. <VirtualHost example.com>
    ServerAlias www.example.com
    ServerName example.com
    ServerAdmin whatever@email.com
    DocumentRoot /usr/local/etc/httpd/htdocs/example
    #ErrorLog logs/example.com-error_log
    #TransferLog logs/example.com-access_log
    </VirtualHost>



  5. To allow logging for that virtual host, remove the # symbol located in front of "ErrorLog" and "TransferLog" like this:




  6. <VirtualHost example.com>
    ServerAlias www.example.com
    ServerName example.com
    ServerAdmin whatever@email.com
    DocumentRoot /usr/local/etc/httpd/htdocs/example
    ErrorLog logs/example.com-error_log
    TransferLog logs/example.com-access_log
    </VirtualHost>



  7. Save the file and upload the 'httpd.conf' back into the '/www/conf/' directory.


That's it! Access and Error logs for 'example.com' will now go to the specified files. Using the "logs/" at the beginning will place the new logs in the same place as your original logs (/www/logs).

NOTE: Remember to clear (delete) logs regularly, as the can accumulate over a period of time and will go against your alloted web space (there is a fee if you go over your alloted space!)

We have recently added the QuickStats Program so you can setup a graphical analyzer for the logs you have created.
Back to Index

The Computer House Technology Center, Inc.
740 South Sixth Avenue
Galloway, New Jersey 08205
(800) 372-6834 --- FAX: (609) 748-9776

Copyright © 2001 Computer House, Inc. All Rights Reserved.