Question

Help me to fix "ERR_CONNECTION_REFUSED"

Help me to fix “ERR_CONNECTION_REFUSED”

Hello, help me please!

I power off my droplet to do a Snapshot, but after that my site get:

ERR_CONNECTION_REFUSED

I’m using Ubuntu - LEMP - Nginx

Subscribe
Share

@Nayara - Not sure if the lack of the log file is the problem, but you could create an empty file:

## assuming you are logged in as root
touch /var/log/nginx/mysitename/access.log

The intervening directory may not be present if it fails. Create and change ownership and permissions for nginx to use:

mkdir -p /var/log/nginx/mysitename
## chown and then chmod commands here

Edit - forgot to mention about checking your firewall. See if you can access your site while on your server using curl or wget.

Oh thank you!!!

I ran that command and works fine now!

mkdir -p /var/log/nginx/mysitename/ touch /var/log/nginx/mysitename/access.log

Hi, the droplet is active powered, and in digital ocean console I get that message: Printscreen

But I don’t can enter through console digital ocean because I have private keys configured only in my computer.

I can login through Putty in my computer and I ran:

service nginx restart

And I get that fail:

*Restarting nginx nginx [fail]

Then I ran that command:

sudo nginx -t

And I get:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx [emerg] open() "/var/log/nginx/mysitename/access.log" failed (2: No such file or directory)
nginx: configuration file /etc/nginx/nginx.conf test failed

Can you use the digitalocean dashboard to see the power up state, or if it is powered up use the DO console to see what the boot messages show.


Submit an 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.

This question was answered by @gndo:

@Nayara - Not sure if the lack of the log file is the problem, but you could create an empty file:

## assuming you are logged in as root
touch /var/log/nginx/mysitename/access.log

The intervening directory may not be present if it fails. Create and change ownership and permissions for nginx to use:

mkdir -p /var/log/nginx/mysitename
## chown and then chmod commands here

Edit - forgot to mention about checking your firewall. See if you can access your site while on your server using curl or wget.

View the original comment