0

I'm new to using Ubuntu, and specifically, the terminal. I've set-up a VPS to run Apache on.
Unfortunately, Apache seemed to already have been installed, so I used the command apache2 to run it.
However, the installation was messed up, and the config file didn't exist among other files. I removed the apache2 package, and reinstalled it, but found the same problem existed.
My question is, how can I completely reset the file hierarchy for Apache? It appears that removing it and installing it again doesn't work.
UPDATE
I have used sudo apt-get purge apache2 and then sudo apt-get install apache2. The command apache2 is returning this:

[Sun Feb 08 00:44:30.834898 2015] [core:warn] [pid 11011] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined  
[Sun Feb 08 00:44:30.834983 2015] [core:warn] [pid 11011] AH00111: Config variable ${APACHE_PID_FILE} is not defined  
[Sun Feb 08 00:44:30.834996 2015] [core:warn] [pid 11011] AH00111: Config variable ${APACHE_RUN_USER} is not defined  
[Sun Feb 08 00:44:30.835000 2015] [core:warn] [pid 11011] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined  
[Sun Feb 08 00:44:30.835013 2015] [core:warn] [pid 11011] AH00111: Config variable ${APACHE_LOG_DIR} is not defined  
[Sun Feb 08 00:44:30.837863 2015] [core:warn] [pid 11011:tid 140685188798336] AH00111: Config variable ${APACHE_LOG_DIR} is not defined  
[Sun Feb 08 00:44:30.838044 2015] [core:warn] [pid 11011:tid 140685188798336] AH00111: Config variable ${APACHE_LOG_DIR} is not defined  
[Sun Feb 08 00:44:30.838052 2015] [core:warn] [pid 11011:tid 140685188798336] AH00111: Config variable ${APACHE_LOG_DIR} is not defined  
AH00526: Syntax error on line 74 of /etc/apache2/apache2.conf:  
Invalid Mutex directory in argument file:${APACHE_LOCK_DIR}

And the command sudo service apache2 start returns this:

* Starting web server apache2

  • Which file hierarchy? The /etc/apache2 directory? – douggro Feb 8 '15 at 2:53
  • What was the output of the command apache2? Normally, you use the command sudo service apache2 start to start apache. – jkd Feb 8 '15 at 4:08
  • Did you try sudo apt-get purge apache2? – jkd Feb 8 '15 at 4:18
  • @douggro Yes, that's the one – Hussain Khalil Feb 8 '15 at 4:36
  • The output for sudo service apache2 start means the apache server started correctly. – jkd Feb 8 '15 at 18:42
0

I just installed Apache2 and these are the config files that were installed onto my computer.

https://dl.dropboxusercontent.com/u/122705406/Google%20Drive/server%20default%20config/apach2e.zip

Download it, unzip it then replace the /etc/apache2 directory with this folder.

Also, start the apache server with

sudo service apache2 start

and you might want to try

sudo apt-get purge apache2

instead of apt-get remove.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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