Question

Ubutu 13 + Ispconfig 3 + nginx = 403 error

Posted March 7, 2014 6.4k views
Hi all I folowed this tutorial http://www.howtoforge.com/perfect-server-ubuntu-12.04-lts-nginx-bind-dovecot-ispconfig-3 I can't access the server by ip (http://107.170.19.201), nor my vhost by domain (crescernavida.com.br - added via ispconfig and as dns http://pastebin.com/6cAhjk5P), both give me 403 Forbiden. So i checked /etc/nginx/sites-available/ crescernavida.com.br.vhost and i find this: # nginx did not start after modifying this vhost file. # Please check file /etc/nginx/sites-available/crescernavida.com.br.vhost.err for syntax errors. This is inside /crescernavida.com.br.vhost.err -> http://pastebin.com/XqjCcCc3 Ok, so i thought 'hey, 403 forbiden means wrong permissions, right?' well, so $ls /var/www apps clients crescernavida.com.br webalizer ------------ $ ls -l lrwxrwxrwx 1 jmsystem www-data 30 Mar 6 16:32 crescernavida.com.br -> /var/www/clients/client0/web1/ root@crescernavida:/var/www# ------------ Ok, so i went to /var/www/clients/client0/web1 --------- # ls -l total 24 drwxr-sr-x 2 jmsystem www-data 4096 Mar 6 16:32 cgi-bin drwxr-sr-x 2 jmsystem www-data 4096 Mar 6 16:32 log drwxr-sr-x 2 jmsystem www-data 4096 Mar 6 16:32 private drwxr-sr-x 2 jmsystem www-data 4096 Mar 6 16:32 ssl drwxr-sr-x 2 jmsystem www-data 4096 Mar 6 16:32 tmp drwxrwsr-x 3 jmsystem www-data 4096 Mar 6 16:33 web --------------- going back cd .. to /client0 $ls -l lrwxrwxrwx 1 jmsystem www-data 30 Mar 6 16:32 crescernavida.com.br -> /var/www/clients/client0/web1/ drwxr-xr-x 8 root root 4096 Mar 6 16:32 web1 ---- I'm getting a little lost here, i'm not sure if i'm giving you all much useless data, so here's the last one: /var/log/nginx/erros.log (check full here: http://pastebin.com/hbGhycuR ) ---------------------------------------- 2014/03/06 22:20:33 [error] 9081#0: *23 directory index of "/var/www/" is forbidden, client: 189.31.214.241, server: 107.170.19.201, request: "GET / HTTP/1.1", host: "crescernavida.com.br" 2014/03/06 22:25:01 [error] 9081#0: *26 directory index of "/var/www/" is forbidden, client: 127.0.0.1, server: 107.170.19.201, request: "GET / HTTP/1.1", host: "localhost" 2014/03/06 22:30:02 [error] 9081#0: *33 directory index of "/var/www/" is forbidden, client: 127.0.0.1, server: 107.170.19.201, request: "GET / HTTP/1.1", host: "localhost" 2014/03/06 22:35:01 [error] 9081#0: *34 directory index of "/var/www/" is forbidden, client: 127.0.0.1, server: 107.170.19.201, request: "GET / HTTP/1.1", host: "localhost" -------------------------- yeah, also, now, i'm root@crescernavida instead of root@107.170..... , not sure why ABOUT USERS: (just the important ones, i guess) www-data:x:33:jmsystem jmsystem:x:1000: sshusers:x:5002:web1 ispapps:x:5003:www-data ispconfig:x:5004:www-data client0:x:5005:www-data (i don't remember creating this group but....) I'm sorry if I showed you useless reports, or if i miss important one. Please let me know if i can provide any more information to help you understand the problem. Any help will be much appreciated. btw: i've been researching for hover 3 hours now about this specific problem and i just can't solve it with info i got online...... sorry for disturbing you

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
3 answers
You're getting a 403 error because you're requesting a directory without an index file.

(directory index of "/var/www/" is forbidden)
You're getting a 403 error because you're requesting a directory that does not have an index file.

(directory index of "/var/www/" is forbidden)

I have the same problem: when I upload file via scp from another server, files are chown by root. I change chwon -R web1:client1 web and it starts telling me 403 error

I have index.php and it doesn’t work.
I also had index.html, same problem

So the answer from kamaln7 cannot be applied.

Submit an Answer