Created
November 10, 2011 14:00
-
-
Save emineker/1354908 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name localhost; | |
root /var/www; | |
index index.html index.htm index.php; | |
rewrite ^/*$ /a/ redirect; | |
set $service ""; | |
if ($request_uri ~* ^(/[^/]+)/.*$) { | |
set $service $1; | |
} | |
location / { | |
try_files $uri $uri/ $service/index.php; | |
} | |
location ~ \.php$ { | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $request_filename; | |
include fastcgi_params; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment