Doesnt work on public IP - uWSGI, Nginx

I thought Nginx was easy :frowning:

I use that file to make uwsgi run at startup system, with commands

uwsgi --ini my_project.ini
sudo ln -s /home/fornakter/django/my_project.ini /home/fornakter/django/venv/vassals/

Maybe is better for me to start again with Gunicorn?

Let’s take a step back here.

Where are you getting these commands and files from that you are trying to use?

Are you trying to combine information from multiple sources? (That’s generally a really bad idea for something like this. Find one comprehensive source and use it exclusively. Do not go looking for information anywhere else unless it’s explicitly intended to expand on or enhance your primary source.)

That’s entirely up to you.

But my recommendation at first - regardless of the uwsgi/gunicorn choice - is to get this working with a TCP socket before trying to get it working with a domain socket.

Nginx is easy. Uwsgi is actually fairly easy. It’s getting all these different parts working together that can be difficult…

I’ll just provide a link to the course I used

Ok, so reading through this, it appears to be laid out in a sequence of steps.

I’m hoping you worked through these steps in the order presented.

At which step did things stop working?

Not really that au fait with uWSGI, but isn’t the simplest way to check it is running to connect to it directly, rather than through an intermediate web server, ie:

http://127.0.0.1:9090

?

Except that in the configuration shown, uwsgi isn’t listening on a tcp port. It’s connecting to a unix domain socket.

Again, outside my experience really, but can’t you telnet to the socket, or something!?

As i sad on top - Django doesnt work on public IP
I want to start server with django website. Everything works on local IP, but on public works only Nginx.

If you run the uWSGI service connecting via a tcp port, you can connect to it directly, rather than via Nginx, ie http://127.0.0.1:9090.

If you are running it to connect via a Unix socket, then I don’t know how to connect to that, but I am sure it is possible.

Trying to connect to the uWSGI service directly confirms that the uWSGI service is running, etc, so that you can perhaps narrow your problem down to a Nginx, or other, configuration issue.

No, it is not. At least not directly.