By kloster555
I am using Nginx to run my website on Ubuntu 14.04. I just got it setup a few days ago. Everything was working fine until my router ended up changing my IP address on my Ubuntu server last night. I didn’t known my server was setup with the DHCP protocol, I thought it was static. When my website wouldn’t come up this morning I determined the problem to be the new IP address. I still have a problem though. When I access my server with the new IP address I now get the “Welcome to nginx!” page. My website won’t come up anymore. The only thing that changed was the IP address. I have since programmed my router to reserve the new IP address for my server so that it won’t change again. I also changed my port forwarding IP on my router to use the new IP address so that when my DNS uses my public IP to locate my router it will be forwarded to my server. The thing that makes no since is that the new IP address just brings up the “Welcome to nginx!” page and not my website. All of my files are still in place and nothing else changed. Does anyone have any idea what happened?
Thanks in advance for any advice.
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!
Thank you again for your help.
Thanks for showing me how to verify the Nginx configuration with the $ sudo nginx -t command.
When I changed server_name visualcommproductions; to server_name _`; the configuration test failed. Maybe I did not enter it correctly. Wanted to confirm I did it right. I entered it with an underscore after name and then an apostrophe followed by a semicolon.
The configuration verification passed with the word visualcommproductions even though visualcommproductions is not the name of my server, it is the domain name of my website. I changed this to the host name of my server and it still passed the configuration verification test, but it didn’t fix the problem. My website still isn’t coming up.
Thank you.
What about your Server blocks?
Make sure if you entered IP somewhere in server block to change it to new IP.
Also I can recommend verifying root directive, verify does it point to location of website.
If you use custom server block make sure it is enabled (i.e. symlinked from sites-available to sites-enabled).
I had the same problem for Nginx on Ubuntu 14.04. It was known to break it like that after update. You can also try restarting it:
- sudo service nginx restart
If you need help with Server Blocks, you can refer to How To Set Up Nginx Server Blocks (Virtual Hosts) on Ubuntu 14.04 LTS.
This comment has been deleted
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.