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

 How do I view raw logs for a virtual host?

 
Answer
 
If your virtual host want to view thier own log files you will need to do the following:

  1. Save the following files to your system.
    Note: On some browsers you may need to hold your left shift key when clicking.
    vhserverinfo.html
    vhshowlogs.pl


  2. Open the vhserverinfo.html in a dostext editor (notepad works fine).


  3. Find these lines:

    <A HREF="/virtualcgi/vhshowlogs.pl?log=Access">Examine Access Log

    <A HREF="/virtualcgi/vhshowlogs.pl?log=Error">Examine Error Log

  4. Change virtualcgi to the ScriptAlias you created for your Virtual Host cgi-bin in your srm.conf file, or the cgi-bin ScriptAlias name you setup when setting a Virtual Host's cgi-bin in the cpanel.


  5. Save the file.


  6. Upload vhserverinfo.html to your virtual host site. If you have already setup a wwwstat program, upload it to the 'wwwstat' directory.


  7. Open the vhshowlogs.pl in a dostext editor (notepad works fine).


  8. Find these lines:

    if ($FORM{'log'} eq "Access") { $logf = "$logdir/vhdomain.com-access_log"; }

    elsif ($FORM{'log'} eq "Error") { $logf = "$logdir/vhdomain.com-error_log"; }

  9. Change vhdomain.com to the virtual's domain name.


  10. Change vhdomain.com to the the virtual's domain name.


  11. The log names should match the names of the log files you created for your virtual host.


  12. Save the file.


  13. Upload vhshowlogs.pl to your virtual host cgi-bin.


  14. Set permissions for vhshowlogs.pl to executable. (755)


  15. Now your virtual host should be able to view their server logs.
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.