Answer the question
In order to leave comments, you need to log in
Apache autostart in Ubuntu
Good afternoon
After I installed every LAMP, I noticed that Apache does not start automatically when it starts. There are no errors in the logs. If you start by hand - it starts.
I was looking for a solution, they say this is due to the fact that MySQL starts later, so Apache cannot start.
How to solve this problem?
Or maybe the problem is somewhere else?
Answer the question
In order to leave comments, you need to log in
sudo update-rc.d apache2 default
or httpd - depending on what the service is called
they say it is because MySQL starts up later
what do they write in the logs? It's probably some kind of error...
they say it's because MySQL starts up later, so apache can't start.
How to solve this problem?
update-rc.d is no longer used in ubuntu, it is now customary to add daemons to autostart via insserv -v /etc/init.d/apache2
Patch the autorun script so that it writes all stdout/stderr from apachectl to the log file.
cp your-apache-init.d.sh /etc/init.d
chkconfig --help
Well, or a stupid symlink in /etc/init.d/apache
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question