Skip to content

Instantly share code, notes, and snippets.

@k0001
Created October 29, 2010 13:47
Show Gist options
  • Save k0001/653592 to your computer and use it in GitHub Desktop.
Save k0001/653592 to your computer and use it in GitHub Desktop.
nginx config: userdir php.
location ~ ^/~(.+?)/(.+?\.php)$ {
root /home/$1/www/$2;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ ^/~(.+?)(/.*)?$ {
alias /home/$1/www$2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment