Joined June 2013
·
Posted to
Installing Nginx in Mac OS X Maverick With Homebrew
over 1 year
ago
@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
T-Rex
Have at least one original repo where C is the dominant language
Raven
Have at least one original repo where some form of shell script is the dominant language
Komodo Dragon 3
Have at least three original repos where Java is the dominant language
Epidexipteryx
Have at least one original repo where C++ is the dominant language
Nephila Komaci 3
Have at least three original repos where PHP is the dominant language
Forked
Have a project valued enough to be forked by someone else
Komodo Dragon
Have at least one original repo where Java is the dominant language
Nephila Komaci
Have at least one original repos where PHP is the dominant language
Walrus
The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos
Charity
Fork and commit to someone's open source project in need
Python
Would you expect anything less? Have at least one original repo where Python is the dominant language
Lab
Have at least one original repo where C# is the dominant language
@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.