0

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.

fordev
  • 1
  • What is the problem you are having? – Michael Hampton Feb 22 '21 at 17:07
  • If you are still listening after four days: "It doesn't work" is not a sufficient problem description. Be specific and tell us which request you send to http://x.x.x.x/append, what you expect to happen, and what happens against your expectations. – berndbausch Feb 27 '21 at 07:10
  • @MichaelHampton thanks for asking that. I fixed the problem. My problem was selected port. I was using the port 80 but in the linux server that I used, port 80 cannot access from out addresses. I learned it later. Then I changed the port number to the configured public port address. – fordev Feb 28 '21 at 10:54
  • @berndbausch I explained it on the above. Thanks. – fordev Feb 28 '21 at 10:55

0 Answers0