Last Updated: February 25, 2016
· tixastronauta

Setting Nginx for Symfony 1.4 projects

I’ve been trying out nginx server for symfony 1.4 applications, the configuration can be a little bit tricky though… Here’s a working example:

server {
  listen 80;


  root /var/www/;

  access_log /var/www/ main;
  error_log /var/www/;

  index index.php;

  location / {
    try_files $uri $uri/ /index.php$uri?$args;

  location ~ "^(.+\.php)($|/)" {
        fastcgi_split_path_info ^(.+\.php)(.*)$;

        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param SCRIPT_NAME $fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
        include        fastcgi_params;


1 Response
Add your response

Great you save my life

over 1 year ago ·