I launch the site with the command: puma -e development -p 3000 -d

It works, but how is the version without port correctly spelled? And then without an explicit indication of the port on the site does not go.

UPD

I'm trying to start by simply pointing to port 80 of puma -e development -p 80 -d, I just have a page on this nginx port.

    1 answer 1

    There are many nuances.

    1. "Without port" browser accesses port 80

    So you need to hang the server on port 80, the default port for HTTP.

    2. ... but ports <1024 can only be occupied by the superuser

    ... or someone who was explicitly given such authority.

    3. ... but they don't usually do that

    Moreover, if you have a web server package on your system, like Apache or nginx (your case!), Most likely this port is already occupied and Puma will not start until you release it. Yes, even with superuser privileges, it is impossible to take one TCP port by two processes.

    ... usually, the real server 80 is not exposed to the application server itself, but to the reverse proxy in front of it. So that it can respond intelligently even when the application server is down. So leave it on the 80th nginx, but configure it to play the reverse proxy role for Puma.

    4. ... and technically you can start a server without a port at all

    ... but outside it will not be available. This can be done by running the server on a Unix domain socket using the -b unix://путь-к-сокету . And then you can configure a reverse proxy to send requests to the application to this socket.