Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have done just as in the tutorials but is simply not working:

server {
    location /abc {
        autoindex on;
        root          /home/user/abc/;

It gives me 403 Forbidden, what I'm doing wrong? thanks; I've tried to use a "/" at the end, and also without but no changes.

When I go to myip/abc I hope to see some directory list but no. Even if I try to go to myip/abc/myfile.txt it doesnt work.

share|improve this question

1 Answer 1

The problem is that by using the root instead of alias it will look in the wrong path. Also in the http the user was www-something and has had no permissions, thanks ubuntu, so now I had to change to my name and it worked:

  • Alias instead of root for the right path
  • Define the right user that has permissions to the folder you want
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.