Advertisement
Guest User

Untitled

a guest
Nov 26th, 2013
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. In this case, I found out why Apache wouldn't start. I could not find a trace of this in the startup logs, only in the output printed to the screen on bootup.
  2.  
  3. But here you go: The last line in the script /etc/apache2/apache2.conf failed.
  4.  
  5. Why?
  6.  
  7. It says:
  8.  
  9. Include sites-enabled/
  10.  
  11. However, two of the sites I've set up are located in my own home directory - which is encrypted!
  12.  
  13. So, on bootup (during startup of Apache) these sites don't exist, and Apache fails and refuses to run.
  14.  
  15. Solution?
  16.  
  17. I've created a small script called "disable_sites" and symlinked it into /etc/rc0.d and /etc/rc6.d (shutdown and reboot):
  18.  
  19. #!/bin/bash
  20.  
  21. /usr/sbin/a2dissite vvsshop
  22. /usr/sbin/a2dissite neoflex
  23. /etc/init.d/apache2 reload
  24.  
  25. exit 0
  26. I also made a script to re-enable the sites whenever I log in and added it as a startup program in my System Settings. So now it works!
  27.  
  28. So, I suppose the lesson here is that when Apache inexplicably fails to load during bootup and you can't find any errors in the logs or when starting the server manually, check if all the directories it needs are available. This could probably also be solved in some other way.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement