Find the answer to your Linux question:
Results 1 to 4 of 4
Hi, I'm using Debian 6.0.5 (squeeze) 64bit. In the file /etc/apache2/sites-available/troppo-jewelry.com I have the following entry: Code: <VirtualHost *:80> ServerAdmin webmaster_AT_troppo-jewelry.com ServerName troppo-jewelry.com ServerAlias www_dot_troppo-jewelry.com # Indexes + Directory Root. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2012
    Posts
    3

    Apache log file location for virtual host


    Hi,

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

    In the file /etc/apache2/sites-available/troppo-jewelry.com I have the following entry:

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

    I then changed the logfile entry to this:

    Code:
    ....snip...
    
            # Logfiles
            LogLevel warn
            ErrorLog  /var/www/vhosts/troppo-jewelry.com/logs/error.log
            CustomLog /var/www/vhosts/troppo-jewelry.com/logs/access.log vhost_combined
    </VirtualHost>
    and suddenly the files are written to the correct folder /var/www/vhosts/troppo-jewelry.com/logs/

    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...

    Thanks

  2. #2
    Just Joined!
    Join Date
    Sep 2012
    Posts
    3

    [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
    Location
    california
    Posts
    234
    Baliken,

    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
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Sep 2012
    Posts
    3
    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
  •