UserDir

white_gecko nginx-forum at nginx.us
Thu Feb 16 21:57:37 UTC 2012


Hello,
I have a very similar problem. I want to use userdirs as in apache and
as described here: http://wiki.nginx.org/UserDir and use php with
fast-cgi in these userdirs. I've tried it with this:

        location ~ ^/~(.+?)(/.*)?$ {
            alias /home/$1/public_html$2;
            index  index.html index.htm;
            autoindex on;
            location ~ \.php$ {
                fastcgi_pass 127.0.0.1:9000;
                fastcgi_index index.php;
                include fastcgi_params;
            }
        }

But it get empty pages, when I try to call a php-file.
How can I get php files with match this location to be forwarded to
fast-cgi?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,221861,222506#msg-222506



More information about the nginx mailing list