Joined June 2013
·

Pablo Henrique Penha Silva

Brazil
·
·
·

@weizhang185 your problem is due to something quite simple: some other application is already using port 80. You could figure out what is the app using that port and delete it or change the port the service is using. I had the same problem and the way I fixed it was modifying my nginx.conf file to this:

server {
listen 8080;
server_name localhost;

access_log logs/host.access.log main;

location / {
root html;
index index.html index.htm;
}

That means that nginx will use port 8080 instead of 80. To access it I would use this url: http://localhost:8080.

If you fix that problem and now you're getting the 403 Forbidden error, read my last comment right here on this page.

@juniorand
@sijpkes
I had the same problem. The problem is 403 Forbidden, which means that the file (probably the index.html) has no permission to be read. So execute this command:

$ sudo chmod 777 /var/www/index.html

Your problem will be solved. Of course, make sure that you have that file inside that specific path.

OBS.: I left the port 8080 in my nginx.conf, because apache is running on port 80 and I need both (for now).

Achievements
134 Karma
975 Total ProTip Views