Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
could you please post the envvars file data through pastebin ? –  AgentCool Feb 17 '13 at 9:15
    
pastebin.com/iHrtUMYq thats my envvars file on pastebin –  user132827 Feb 17 '13 at 9:23
    
What does grep ErrorLog /etc/apache2/sites-enabled/* print? –  Florian Diesch Feb 18 '13 at 1:01
    
I created the path /var/log/apache2 but every time I restart my Pc apapche2 is gone HELP PLEASE D: –  root_tesla Apr 10 at 5:18

1 Answer 1

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!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.