Created
October 8, 2012 22:10
-
-
Save lukearmstrong/3855304 to your computer and use it in GitHub Desktop.
Nginx Configuration: Symfony 2.1.2 (Development Mode)
This file contains hidden or 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 .symfony.dev; | |
access_log /var/log/nginx/symfony.dev-access.log; | |
error_log /var/log/nginx/symfony.dev-error.log error; | |
root /var/www/symfony.dev/web; | |
# index app.php; | |
index app_dev.php; | |
try_files $uri $uri/ @rewrite; | |
location @rewrite { | |
# rewrite ^/(.*)$ /app.php/$1; | |
rewrite ^/(.*)$ /app_dev.php/$1; | |
} | |
location ~ \.php { | |
# fastcgi_index app.php; | |
fastcgi_index app_dev.php; | |
fastcgi_pass unix:/usr/local/var/run/php-fpm.socket; | |
include fastcgi_params; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_param PATH_INFO $fastcgi_path_info; | |
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
} | |
location ~ /\.ht { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why are you using it:
rewrite ^/(.*)$ /app.php/$1;
if on htaccess has it:
RewriteRule ^(.*)$ app.php [QSA,L]
The apache aren't using the $1