6

I am using Ubuntu Studio 12.04 and when I am trying to start apache2, I get this error message:

No such file or directory: apache2: could not open error log file /etc/apache2/$ apache_log_dir /error.log

This meas, I should have a path like this /etc/apache2/var/log/apache2/ but in envvars the log dir is defined as /var/log/apache2$SUFFIX not /etc/apache2/

How can I fix this.

4
  • could you please post the envvars file data through pastebin ?
    – Raja G
    Feb 17, 2013 at 9:15
  • pastebin.com/iHrtUMYq thats my envvars file on pastebin
    – user132827
    Feb 17, 2013 at 9:23
  • What does grep ErrorLog /etc/apache2/sites-enabled/* print? Feb 18, 2013 at 1:01
  • I created the path /var/log/apache2 but every time I restart my Pc apapche2 is gone HELP PLEASE D:
    – user267331
    Apr 10, 2014 at 5:18

1 Answer 1

4

Look at your vhosts-files in /etc/apache2/sites-available/<vhost>. In these files are defined where to find the error log for a specific website (not the global log) i.e. "default".

There are two variables to do this and per default they look like this:

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

Make sure that /var/log/apache2/ exists before you start apache!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .