Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Apr 20, 2012 10:29 am 
Offline
Senior Member

Joined: Mon Jul 30, 2007 9:55 pm
Posts: 80
Tried nginx ML, stackoverflow, and the #nginx IRC channel on freenode to no avail... hoping someone here can help.

My whole nginx conf is here: http://donsbox.com/~dfelicia/conf/

In http://donsbox.com/~dfelicia/conf/sites ... nsbox.conf I have:

Code:
    location ~ ^/~(.+?)/private(/.*)?$ {
        auth_basic "Restricted";
        auth_basic_user_file htpasswd;
        alias /home/$1/private_html$2;
        autoindex on;
    }

    location ~ ^/~(.+?)(/.*)?$ {
        alias /home/$1/public_html$2;
        autoindex on;
    }


Elsewhere in the same file I have:

Code:
    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass phpcgi;
    }


So my /~user/ regex is listed before my .php regex and "wins" so that http://donsbox.com/~dfelicia/ does what I expect. Now I want to be able to run PHP from /~user/, though, and I can't figure out what to add.

i.e. I want this to work: http://donsbox.com/~dfelicia/test.php

I have tried nesting a location block under the /~user/ location, but no luck.

Any help appreciated.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group