I have develop a python flask project which is run on linux server. I'm trying to develop it on my linux server. After much effort on this. I have configured nginx, gunicorn and my application. My nginx sites-available file like that:
server {
listen 80;
server_name x.x.x.x;
location / {
proxy_pass http://unix:/home/myuser/myproject/myproject.sock;
}
}
My project run as service with some configuration. x.x.x.x is my external ip. And my local ip is 192.168.y.z. In my project I have /append, /predict and some other urls. When I send a request to http://192.168.y.z/append it works. But when I send a request via http://x.x.x.x/append it doesn't work. The firewall is not active. I tried it also like:
server_name www.something.com;
But it's not working still.
What is the problem in here? Can anybody help me? Local ip is ok but it's not serving on external ip.