I would restart Apache2 but there comes an Error
$ sudo service apache2 start Starting web server apache2 Action 'start' failed. The Apache error log may have more information.
But all error logs in "/var/log/apache2/" are empty.
Edit: The Files are at "/var/log/apache2" and there are several entries from previous Problems but this Task doesn't create any new etry ...
Where is the Problem?
It was a error in the SSL Certificate and the path to the "error.log" are changed in the vHost configuration.
If you don't need SSL (i don't because i'm running a local system) simply disable all vHost HTTPS/SSL entrys in the configuration by command line for line out.
There are several reasons your Apache server might fail to run. Something could be blocking the port it uses; there could be another instance of Apache already running; or there might be an incompatibility with the version of PHP you're using in MAMP.
If your system wasn't able to restart Apache2 you most likely got some form of an error message. In case you got a reply resembling either one of the output examples below, the service is most likely not properly installed on your system or some files are missing. Failed to restart apache2. service: Unit apache.
On a Linux server, you can access Apache error logs from var/log/apache2/error. log. You can then log out the errors from the error log file by writing the following command: sudo tail -f /var/log/apache2/error.
I also just ran in to a similar problem, that is service apache2 reload
fails but prints no useful information. This is because the script in /etc/init.d/apache
(on Debian, at least) eats the output of the apache2ctl configtest
command it runs to sanitize the Apache config.
An easy solution to get a more meaningful explanation for the failure is to run apache2ctl configtest
again yourself, which will print the (hopefully useful) error messages to the console.
Syntax errors in the config file seem to cause problems. I found what the problem was by going to the directory and excuting this from the command line.
httpd -e info
This gave me the error
Syntax error on line 156 of D:/.../Apache Software Foundation/Apache2.2/conf/httpd.conf: Invalid command 'PHPIniDir', perhaps misspelled or defined by a module not included in the server configuration
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With