Report this

What is the reason for this report?

im getting below error when try to start the nginx

Posted on June 16, 2018

Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Sat 2018-06-16 10:02:39 UTC; 13s ago
Process: 30246 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=1/FAILURE) Process: 30245 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS) Main PID: 1665 (code=exited, status=0/SUCCESS)
Jun 16 10:02:39 ip-172-17-247-243.atom.sbx.loc systemd[1]: Starting The nginx HTTP and reverse proxy server… Jun 16 10:02:39 ip-172-17-247-243.atom.sbx.loc nginx[30246]: nginx: [emerg] open() “/etc/nginx/nginx.conf” failed (13: Permission denied) Jun 16 10:02:39 ip-172-17-247-243.atom.sbx.loc nginx[30246]: nginx: configuration file /etc/nginx/nginx.conf test failedcode



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Hello,

It looks like that you might have an error in your Nginx config file. To test that you could run the following:

sudo nginx -t

Also when you try to restart Nginx, make sure to use sudo as well unless you are logged in as root.

Regards, Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.