Just installed nginx and now having bind error - address already in use Just installed nginx and now having bind error - address already in use nginx nginx

Just installed nginx and now having bind error - address already in use


Look either into

  • your nginx.conf file
  • or any of the sites in sites-enabled (usually under the nginx directory)

and search the server part, listen

  server {    listen   80;

here you can change the port for 81 for instance instead of 80.

Notes:

  • you may also have the server { listen } part within your nginx.conf directly
  • if you are under Linux, the configuration is usually in /etc/nginx (nginx.conf) and sites-enabled is below that directory.
  • regarding Apache (Linux), using either service apache stop or service httpd stop or /etc/init.d/apache stop (or httpd) should work to stop the process, or try killall httpd or killall apache (or apache2) to stop Apache.