Skip to content

Instantly share code, notes, and snippets.

@fabioluciano
Created October 29, 2012 04:23
Show Gist options
  • Save fabioluciano/3971497 to your computer and use it in GitHub Desktop.
Save fabioluciano/3971497 to your computer and use it in GitHub Desktop.
My Nginx Multi-Symfony2 configuration
server {
listen 80 default;
server_name 192.168.0.34 localhost;
server_tokens off;
root /home/nginx/$host/web;
index app.php index.php index.html;
access_log /home/nginx/$host/app/logs/access.log;
error_log /var/log/nginx/error.log;
try_files $uri $uri/ @rewrite;
location @rewrite {
rewrite ^/(.*)$ /app.php/$1;
}
location ~ \.php {
# try_files $uri =404;
fastcgi_index app.php;
fastcgi_pass 127.0.0.1:9000;
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;
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
}
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment