2

I am referring to this link to install Nginx on Ubuntu: Installing Nginx With PHP5 (And PHP-FPM) And MySQL Support (LEMP) On Ubuntu 13.04.

sudo su — Runs OK.

apt-get install mysql-server mysql-client 

mysql-client is already the newest version.
mysql-server is already the newest version.

Yet when I try http://localhost on Firefox it does not show the welcome page. (That is Nginx is not running).

Unable to connect

Firefox can't establish a connection to the server at localhost.

1
  • Just checking the obvious: have you installed and started nginx as described in step 3 in the linked article?
    – lgarzo
    Oct 28, 2013 at 18:39

1 Answer 1

4

Do have a look at the port number used by nginx. Most of the times, if another web-server was installed (e.g. apache standalone, or lamp) and improperly removed, the default port 80 will be occupied.

Best bet is to first check if the port number is occupied by using "netstat" to check the presently using ports.

netstat -antp

If 80 is occupied, then try the following

  1. open nginx.conf and change the server port number to 8080
  2. save and exit
  3. restart nginx by:

    sudo service nginx restart or /etc/init.d/nginx restart
    

Check if the above is working and do the necessary changes later.

1
  • Good explanation, I was expecting the same!! Oct 29, 2013 at 9:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .