Can't Start nginx and apache 2

Posted May 9, 2018 4.5k views
NginxApacheUbuntu 16.04

root@**:/var/log/nginx# service nginx restart
Job for nginx.service failed because the control process exited with error code. See “systemctl status nginx.service” and “journalctl -xe” for details.
:/var/log/nginx# ^C
***:/var/log/nginx# systemctl status nginx.service
● nginx.service - nginx - high performance web server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2018-05-09 14:47:50 EET; 16s ago
Process: 6571 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=1/FAILURE)

May 09 14:47:50 ***** systemd[1]: Starting nginx - high performance web server…
May 09 14:47:50 ***** nginx[6571]: nginx: [emerg] open() “/var/log/apache2/domains/
May 09 14:47:50 ***** systemd[1]: nginx.service: Control process exited, code=exited statu
May 09 14:47:50 ***** systemd[1]: Failed to start nginx - high performance web server.
May 09 14:47:50 ***** systemd[1]: nginx.service: Unit entered failed state.
May 09 14:47:50 ***** systemd[1]: nginx.service: Failed with result ‘exit-code’.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

The error messages here do not point to a specific issue. Can you share your nginx site configuration(s) from /etc/nginx/sites-enabled/`

Can you clarify about your use of Apache? Your post title indicates that you are having an issue with both web servers but your post does not include any details about your use of Apache. These two web servers can both be run on the same system but only if they are utilizing different ports. Nginx can be used as a caching reverse_proxy for Apache but I am not sure whether this is the configuration you’re working with.