Skip to content

Instantly share code, notes, and snippets.

@caquino
Created April 23, 2014 21:18
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save caquino/11232759 to your computer and use it in GitHub Desktop.
Save caquino/11232759 to your computer and use it in GitHub Desktop.
server {
listen 80 default;
server_name ~^(www\.)?(?<domain>.+)$;
root /srv/httpd/$domain/public_html/;
access_log /srv/httpd/$domain/logs/access.log;
location / {
index index.html index.htm index.php;
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment