Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Apache log file location for virtual host


    I'm using Debian 6.0.5 (squeeze) 64bit.

    In the file /etc/apache2/sites-available/ I have the following entry:

    <VirtualHost *:80>
            # Indexes + Directory Root.
            DirectoryIndex index.html
            DocumentRoot /var/www/vhosts/
            # CGI Directory
            ScriptAlias /cgi-bin/ /var/www/vhosts/
            <Location /cgi-bin>
                    Options +ExecCGI
            # Logfiles
            LogLevel warn
            ErrorLog  /var/www/vhosts/
            CustomLog /var/www/vhosts/ combined
    I can access the server no problem. But the log files are written to /var/www/vhosts/ and not to /var/www/vhosts/

    I then changed the logfile entry to this:

            # Logfiles
            LogLevel warn
            ErrorLog  /var/www/vhosts/
            CustomLog /var/www/vhosts/ vhost_combined
    and suddenly the files are written to the correct folder /var/www/vhosts/

    As far as I understand, "vhost_combined" or "combined" are just nicknames for the formatting of the log file. Why does this alter were they are stored???

    Any help sincerely appreciated. This is driving me mad...


  2. #2

    [SOLVED]Apache log file location for virtual host

    Hmmm, I don't know what happens, but after rebooting the machine, I tried again, and this time it works with both logfile formats...

    Anyway, thanks for reading....

  3. #3
    Linux Newbie objuan's Avatar
    Join Date
    Jul 2006

    Any time you make changes to apache files or update your site directories with content you will need to restart apache. You don't need to restart the server.
    example /etc/init.d/apache restart
    Linux is the FORCE

  4. $spacer_open
  5. #4
    Thanks, but I restarted apache and reloaded the conf files by using:
    /etc/init.d/apache reload
    /etc/init.d/apache restart

    But only after restarting the physical machine it worked....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts