By pcvanmotman
Hi guys,
I have nginx running on my ubuntu 14.04 droplet, with one website at the moment. It was online and accessible until today, since I’m now getting a ERR_CONNECTION_REFUSED when I type in the url. It doesn’t work on other devices/networks as well, but I can ping it…
Which lets me to believe there is suddenly something wrong with my configuration (although I haven’t changed anything lately). Within my /etc/nginx/sites-enabled/default file my settings are as followed:
server {
listen 80;
server_name paulvanmotman.com www.paulvanmotman.com;
rewrite ^ https://www.$server_name$request_uri? permanent;
}
server {
listen 443 ssl;
root /var/www/paulvanMotman;
index index.html index.htm;
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
expires 168h;
}
ssl on;
ssl_certificate /etc/nginx/ssl/ssl-bundle.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
server_name paulvanmotman.com www.paulvanmotman.com;
location / {
try_files $uri $uri/ =404;
}
}
If anyone could help me out I would greatly appreciate!
Kind regards,
Paul
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!
Solved the problem myself! For anyone who is interested, this was the problem I had: http://stackoverflow.com/questions/26210115/webserver-with-nginx-working-until-save-file-created
If your configuration worked before as expected, you made no changes, and now it does not function, this may not be the source of the issue.
It sounds like your web server process crashed. You should start out by checking your log files in /var/log/nginx/error.log to see what happened when the service stopped responding.
You can also attempt to restart the nginx service by running service nginx restart
if you can share any error messages you see in the logs or when attempting to restart the service here we’ll be happy to help you identify the issue.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.