'Receive 404 Not Found for a Flask app when I use Nginx as reverse proxy with Gunicorn socket
I am getting this error only on some routes and not all,rest everything is working fine below is the code, i have used nginx as a reverse proxy with gunicorn and wsgi, dont know why getting this error only on some new routes
server {
listen 80;
listen [::]:80 default_server;
listen 443 ssl;
root /home/ubuntu/selexmb/sassmlapp/frontend/build;
server_name abc.com;
ssl_certificate /etc/nginx/certificate/nginx-certificate.crt;
ssl_certificate_key /etc/nginx/certificate/nginx.key;
location / {
try_files $uri /index.html;
}
}
server {
listen 80 ;
listen [::]:80 ;
listen 443 ssl;
server_name api.abc.com;
ssl_certificate /etc/nginx/certificate/nginx-certificate.crt;
ssl_certificate_key /etc/nginx/certificate/nginx.key;
location / {
include proxy_params;
proxy_pass http://unix:/home/ubuntu/selexmb/sassmlapp/backend/app.sock;
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
