Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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.
- But here you go: The last line in the script /etc/apache2/apache2.conf failed.
- Why?
- It says:
- Include sites-enabled/
- However, two of the sites I've set up are located in my own home directory - which is encrypted!
- So, on bootup (during startup of Apache) these sites don't exist, and Apache fails and refuses to run.
- Solution?
- I've created a small script called "disable_sites" and symlinked it into /etc/rc0.d and /etc/rc6.d (shutdown and reboot):
- #!/bin/bash
- /usr/sbin/a2dissite vvsshop
- /usr/sbin/a2dissite neoflex
- /etc/init.d/apache2 reload
- exit 0
- 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!
- 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