Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I just need to setup a development environment with Nginx. I have setup an alias/location in nginx.conf

user http;
...

server {
    listen       80;
    server_name  localhost;
    ...
    location /marionette/ {
        root   /home/jiewmeng/yeoman-bb-try/app/;
        index  index.html index.htm;
    }

I got 403.

I changed the user to my logged in user (since the root is in my home directory). but it didnt help

I tried chmod even 777, still same results

In nginx.conf I set user root;, still little help ...

I added my user jiewmeng to the http group. Then chown jiewmeng:http the folder ... still didn't work ...

[jiewmeng@JM-VBOX ~]$ ls -l /home/jiewmeng/yeoman-bb-try/app
total 40
-rwxrwxrwx 1 jiewmeng http 4464 May 20 17:08 404.html
drwxrwxrwx 8 jiewmeng http 4096 May 20 17:08 bower_components
-rwxrwxrwx 1 jiewmeng http 6774 May 20 17:08 favicon.ico
drwxrwxrwx 2 jiewmeng http 4096 May 20 17:08 images
-rwxrwxrwx 1 jiewmeng http 2287 May 20 17:08 index.html
-rwxrwxrwx 1 jiewmeng http   31 May 20 17:08 robots.txt
drwxrwxrwx 3 jiewmeng http 4096 May 20 17:08 scripts
drwxrwxrwx 2 jiewmeng http 4096 May 20 17:08 styles
share

migration rejected from webmasters.stackexchange.com Jun 18 '13 at 13:56

This question came from our site for pro webmasters. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as off topic by Iain, Ward, mdpc, Jim B, SvW Jun 18 '13 at 13:56

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

Try removing the trailing slash in your config file, i.e.;

Before: location /marionette/ {

After: location /marionette {

If that doesn't do the trick for you, change root to alias instead.

For the why's, check out the docs on alias here.

share
    
Please take a moment to include at least part of "the Why's" in your answer so that people don't have to go ferreting around the internet to find them. Sadly most people don't bother following links anymore... –  voretaq7 Jun 17 '13 at 16:00
1  
The why part: root looks for a subdirectory marionette, which clearly isn't there. Alias maps the location to the given directory. And one should really follow links on this site. –  Melvyn Jun 18 '13 at 6:37

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