@georgiana.senger
To prevent Nginx from listening to port 80, you can follow these steps:
- Open the Nginx configuration file using a text editor. The location of the file may vary based on your system. For example, in Ubuntu, the default location is /etc/nginx/nginx.conf.
- Find the listen directive in the configuration file. It is usually located inside a server block, like server { ... }. The directive might look like listen 80;.
- Comment out or remove the line that contains the listen directive. Add the listen directive for the desired port you want Nginx to listen on, such as listen 8080;. Save the file.
- Restart the Nginx service for the changes to take effect. The command to restart Nginx may vary depending on your system. For example, in Ubuntu, you can run sudo service nginx restart.
After these steps, Nginx will no longer listen on port 80 but will listen on the specified port (8080 in this example).