Question

cannot access my website after updaing the nginx config file and doing OS updates

I am a total beginner with servers administration and Ubuntu. I am using Cloud66 to manage my digital ocean droplet. My website was opening normally today, then I have done three actions, which lead to my site not opening anymore on browsers with the below error:

ERROR
The requested URL could not be retrieved
While trying to retrieve the URL: http://www.sitename.com/
The following error was encountered:
Connection to 198.211.118.189 Failed
The system returned:
    (111) Connection refused
The remote host or network may be down. Please try the request again.
Your cache administrator is webmaster. 
Generated Wed, 11 Feb 2015 22:59:11 GMT by google.com (squid/2.7.STABLE6)

These are the three action I have taken today: 1- Added some lines to my nginx config file through cloud66 interface after the change I checked tafqit.com still working…no issues. (But I am not sure when the change of the config file takes affect? ) below are the lines I have added, please note that I have no experience but was trying to enable caching for my site…and found this code from a solution on the Internet.


location ~ ^/(assets)/  {
  root /path/to/site;
  gzip_static on;
  expires max;
  add_header Cache-Control public;
  # access_log /dev/null;
}

2- Accessed my droplet through digital ocean console and run update sudo apt-get update and sudo apt-get upgrade 3- Rebooted through the same Digital Ocean console using the command sudo reboot.

After the reboot the site is no longer accessible. What may be the reason??

Show comments

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Problem solved. It was in the code nginx.conf public should have been in quotations.