Can't reach website anymore, only "Welcome to nginx!" page comes up.

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.

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.

Thank you very much for your assitance.

I verified that I had not entered the IP anywhere in server block. I also verified my root directive.

How do you symlink sites-available to sites-enabled?

Following is what my sites-available/default file looks like:

# You may add here your
#  server {
#       ...
# }
# statements for each of your virtual hosts to this file

# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.

server {
        listen 80 default_server;
        listen [::]:80 default_server ipv6only=on;

        root /usr/share/nginx/html;
        index index.php index.html index.htm;

        # Make site accessible from http://localhost/
        server_name visualcommproductions;

        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                try_files $uri $uri/ =404;
                # Uncomment to enable naxsi on this location
                # include /etc/nginx/naxsi.rules

        error_page 404 /404.html;
        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
                root /usr/share/nginx/html;

        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;

        # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests
        #location /RequestDenied {
        #       proxy_pass;

        #error_page 404 /404.html;

        # redirect server error pages to the static page /50x.html
        #error_page 500 502 503 504 /50x.html;

Thanks again

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.

This comment has been deleted