Report this

What is the reason for this report?

Url is still showing the NGINX default page instead of the application page (UBUNTU+NGINX+FLASK)

Posted on December 18, 2021

Connected Tutorial(This question is a follow-up to this tutorial):

How To Serve Flask Applications with Gunicorn and Nginx on Ubuntu 20.04

As i was following through the tutorial (How To Serve Flask Applications with Gunicorn and Nginx on Ubuntu 20.04). Everything is setup. I do not have a domain. I point to the ip URL so in the file this is my entry

server { listen 80; server_name http://54.219.38.215/;

location / {
    include proxy_params;
    proxy_pass http://unix:/home/ubuntu/apps/visionapp/visionapp.sock;
}

}

now when i browse http://54.219.38.215/ it still points to Welcome to nginx! instead of Hello world



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!

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.

Hi there,

I believe that you should not specify the http:// part for the server name. It should only be:

server_name 54.219.38.215;

Also if you have a default Nginx server block, I would recommend removing it and only leaving the new one that you’ve added. You can remove the default one from the /etc/nginx/sites-enabled directory using the unlink command.

Also, keep in mind that you would need to restart Nginx after the configuration changes.

Best, Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.