Skip to content

Instantly share code, notes, and snippets.

@o
Created August 4, 2013 00:48
Show Gist options
  • Save o/6148580 to your computer and use it in GitHub Desktop.
Save o/6148580 to your computer and use it in GitHub Desktop.
Symfony2 Nginx Configuration (For production)
upstream php5-fpm-sock {
server unix:/var/run/php5-fpm.sock;
}
server {
listen 80;
server_name domain.com;
root /path/to/domain.com/public_html/web/;
charset utf-8;
access_log /path/to/domain.com/logs/access.log;
error_log /path/to/domain.com/logs/error.log;
index app.php index.html index.htm;
try_files $uri $uri/ /app.php?$query_string;
location ~ \.php$ {
fastcgi_pass php5-fpm-sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment