I have created a windows amazon ec2 instance and setup a flask app on it. localhost opens the required home page. Then is used waitress-serve to host the app.py file and also created a service with nssm. After that i download and execute the nginx.exe. Now my ec2 public ip shows the nginx home page. After modifying the nginx.conf file i expected to see the home page and not nginx home page but i still get the nginx home page. Following is my nginx.conf file text
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
#include /etc/nginx/sites-enabled/*;
#include mime.types;
#default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
#sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
upstream flaskhelloworld {
server 127.0.0.1:5000;
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
server {
listen 80 default_server;
server_name my_public_ip;
listen [::]:80 default_server;
root /var/www/html;
server_name _;
location / {
proxy_pass http://flaskhelloworld;
}
}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}