Hello anyone can help me in my streamlit in AWS using nginx, the website is displaying but I’m getting this error when running my code. Thank you
nginx.conf:
server {
listen 80;
listen [::]:80;
server_name _;
client_max_body_size 20M;
location / {
proxy_pass http://localhost:8501;
}
location ^~ /_stcore/static {
proxy_pass http://localhost:8501/static;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Sec-WebSocket-Extensions $http_sec_websocket_extentions;
proxy_read_timeout 85400;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
location ^~ /_stcore/healthz {
proxy_pass http://localhost:8501/_stcore/healthz;
}
location ^~ /_stcore/vendor {
proxy_pass http://localhost:8501/_stcore/vendor;
}
location /_stcore/stream {
proxy_pass http://localhost:8501/_stcore/stream;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Sec-WebSocket-Extensions $http_sec_websocket_extentions;
proxy_read_timeout 85400;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
root /usr/share/nginx/html;
include /etc/nginx/default.d/*.conf;
error_page 404 /404.html;
location = /404.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}