Web Page Not Updating


So I’m a new user here, and am following this tutorial closely:—-creating-a-hello-world-application

I managed to get all the way down to Step 6, where I create a new application. I figured I would do this by modifying the index.html file. However, once I have done that, my web page still displays the default nginx message! I even tried to restart the entire server as well as nginx. Does anyone know what could be the problem? Thanks!

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.


When it comes to NGINX and NodeJS, you’ll need to configure your NGINX server block to proxy to your NodeJS application.

By default, NGINX listens on Port 80 – most NodeJS applications listen on ports such as 3000 or the port that your application is configured to listen on. The reason for this is security – you don’t want a NodeJS application running as root, which would be required in most cases if you wanted to run it on port 80 instead of NGINX.

When you install NGINX, a default server block is created here:


What you’d want to do is wipe that file clean.

truncate -s 0 /etc/nginx/sites-available/default

Then open it up:

nano /etc/nginx/sites-available/default

Inside of that file, you’d want to paste your modified version of this:

upstream @backend {

    listen 80;
    listen [::]:80;

    location /
        proxy_pass http://@backend;

        proxy_buffers 16 32k;
        proxy_buffer_size 64k;
        proxy_busy_buffers_size 128k;
        proxy_cache_bypass $http_pragma $http_authorization;
        proxy_connect_timeout 59s;
        proxy_hide_header X-Powered-By;
        proxy_http_version 1.1;
        proxy_ignore_headers Cache-Control Expires;
        proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 http_404;
        proxy_no_cache $http_pragma $http_authorization;
        proxy_pass_header Set-Cookie;
        proxy_read_timeout 600;
        proxy_redirect off;
        proxy_send_timeout 600;
        proxy_temp_file_write_size 64k;
        proxy_set_header Accept-Encoding '';
        proxy_set_header Cookie $http_cookie;
        proxy_set_header Host $host;
        proxy_set_header Proxy '';
        proxy_set_header Referer $http_referer;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Original-Request $request_uri;

In the above, you’d want to change server; to match your NodeJS port (i.e. change 3000 to your port). You’d also want to make sure your NodeJS application is running from localhost using as the IP.

You’ll also want to change server_name; to match your domain.

You’d then save the file and restart NGINX using:

service nginx restart

The above sets NGINX up as a Reverse Proxy, which is what we need in order to keep the port out of the URL. Without NGINX, or a web server in general, you’d have to listen on a public IP and add the port to your URL.