Can't Start nginx and apache 2

May 9, 2018 849 views
Apache Nginx Ubuntu 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.
root@
:/var/log/nginx# ^C
root@
***:/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
Docs: http://nginx.org/en/docs/
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/srvx.om
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'.

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.

  • /etc/nginx/sites-enabled/ the file is empty

    • /etc/nginx/sites-enabled is a directory that should contain your site configuration(s). On installation of Nginx the file /etc/nginx/sites-enabled/default is created.

      • The server was working well . But I open my control panel ( vestacp) ', and stopped a site from within the client to be in the case of (Suspend) and then this problem occurred

      • tell me what i do now ?

Have another answer? Share your knowledge.