Created
July 25, 2011 19:53
-
-
Save blt/1105020 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; | |
root /var/www/; | |
index index.html index.htm index.php; | |
server_name dev.example.com | |
location / { | |
# First attempt to serve request as file, then | |
# as directory, then fall back to index.html | |
try_files $uri $uri/ /index.php; | |
} | |
location /(?P<foo>[a-Z0-9])/[a-Z]*\.php { | |
# Rewrite $uri | |
rewrite ^ /$foo/public/index.php break; | |
} | |
error_page 404 /404.html; | |
# pass the PHP scripts to FastCGI server | |
location ~ \.php$ { | |
fastcgi_pass unix:/tmp/example_php-fpm.socket; | |
include fastcgi_params; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment