Skip to content

Instantly share code, notes, and snippets.

@yunasc
Forked from alanbriolat/default.conf
Created April 2, 2014 06:00
Show Gist options
  • Save yunasc/9928670 to your computer and use it in GitHub Desktop.
Save yunasc/9928670 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name localhost;
# ... other default site stuff, document root, etc. ...
location ~ ^/~(?<userdir_user>.+?)(?<userdir_uri>/.*)?$ {
alias /home/$userdir_user/public_html$userdir_uri;
index index.html index.htm index.php;
autoindex on;
include php5_generic;
}
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment