Question

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

Posted December 18, 2021 111 views
NginxUbuntuPythonPython FrameworksUbuntu 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

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.

×
Submit an Answer
1 answer

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