Created
September 27, 2012 04:08
-
-
Save rnavarro/3792098 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 81; | |
root /var/sites/app/webroot/; | |
server_name localhost; | |
rewrite_log on; | |
location ^~ /api/ { | |
rewrite /api/(.*)$ /$1 last; | |
} | |
location / { | |
index index.php index.html index.htm; | |
try_files $uri $uri/ /index.php?$uri&$args; | |
} | |
location ~ \.php$ { | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
} | |
# deny access to .htaccess files, if Apache's document root | |
# concurs with nginx's one | |
# | |
location ~ /\.ht { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
did you try:
instead?