Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6180871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:55:18+00:00 2026-05-24T00:55:18+00:00

I am looking for a PHP framework that, if I’m lucky, just works in

  • 0

I am looking for a PHP framework that, if I’m lucky, just works in nginx under FastCGI, otherwise, one that doesn’t take too much tweaking.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T00:55:19+00:00Added an answer on May 24, 2026 at 12:55 am

    Symfony 1.4 with nginx is fantastic. I have already done the tweaking, here is a generalization of my production config that I can vouch is fit for production use.

    server {
      listen 80;
    
      server_name mysite.com;
    
      root /var/www/mysite.com/web;
      access_log /var/log/nginx/mysite.com.access.log;
      error_log /var/log/nginx/mysite.com.error.log;
    
      location ~ ^/(index|frontend|frontend_dev|backend|backend_dev)\.php$ {
        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 HTTPS off;
        fastcgi_pass   127.0.0.1:9000;
      }
    
      location / {
        index index.php;
        try_files $uri /index.php?$args;
      }
    }
    
    server {
      listen 443;
    
      ssl on;
      ssl_certificate      /etc/ssl/certs/mysite.com.crt;
      ssl_certificate_key  /etc/ssl/private/mysite.com.key;
    
      server_name mysite.com;
    
      root /var/www/mysite.com/web;
      access_log /var/log/nginx/mysite.com.access.log;
      error_log /var/log/nginx/mysite.com.error.log;
      location ~ ^/(index|frontend|frontend_dev|backend|backend_dev)\.php$ {
        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 HTTPS on;
        fastcgi_pass   127.0.0.1:9000;
      }
    
      location / {
        index index.php;
        try_files $uri /index.php?$args;
      }
    }
    

    PHP 5.4 Note

    php5-fpm 5.4 that comes with dotdeb now uses sockets instead of the loopback by default. If you are using PHP 5.4 and you are getting a bad gateway error with the above config, try replacing all instances of 127.0.0.1:9000 with unix:/var/run/php5-fpm.sock.

    php-fpm 5.4 also newly limits the file extensions that can be parsed as PHP to those specified in security.limit_extensions. This might be of interested if you have modified the location regex to include other file extensions than .php. The security note below still applies.

    Security Note

    This config only parses the files index.php, frontend.php, frontend_dev.php, backend.php and backend_dev.php with PHP.

    With php and nginx in general, not just with symfony, using

    location \.php$ {
      ...
    }
    

    causes a security vulnerability related to URLs that use pathinfo, like these: /index.php/foo/bar.

    The common workaround is to set fix_pathinfo=0 in php.ini. This breaks pathinfo URLs, and symfony relies on them. The solution used here is to explicitly specify the files that get parsed as php.

    For more information, see the nginx+php-cgi security alert

    Platforms

    This works and is secure on Debian Squeeze systems that use dotdeb for nginx and php-fpm packages, as well as Ubuntu 10.04 Lucid Lynx systems that use ppa/brianmercer for php-fpm. It might or might not work and be secure on other systems.

    Usage note

    To add another PHP file additionalfile.php to get parsed, use this syntax in both location blocks:

    location ~ ^(index|frontend|frontend_dev|backend|backend_dev|additionalfile).php$ {
    …
    }

    Edit: Symfony 2.0 is out! Here is the config, adapted from the 1.4 config above:

    server {
      listen 80;
    
      server_name symfony2;
      root /var/www/symfony2/web;
    
      error_log /var/log/nginx/symfony2.error.log;
      access_log /var/log/nginx/symfony2.access.log;
    
      location / {
        index app.php;
        if (-f $request_filename) {
          break;
        }
        rewrite ^(.*)$ /app.php last;
      }
    
      # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
      #
      location ~ (app|app_dev).php {
        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 HTTPS off;
        fastcgi_pass   127.0.0.1:9000;
      }
    }
    
    server {
      listen 443;
    
      server_name symfony2;
      root /var/www/symfony2/web;
    
      ssl on;
      ssl_certificate      /etc/ssl/certs/symfony2.crt;
      ssl_certificate_key  /etc/ssl/private/symfony2.key;
    
      error_log /var/log/nginx/symfony2.error.log;
      access_log /var/log/nginx/symfony2.access.log;
    
      location / {
        index app.php;
        if (-f $request_filename) {
          break;
        }
        rewrite ^(.*)$ /app.php last;
      }
    
      # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
      #
      location ~ (app|app_dev).php {
        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 HTTPS off;
        fastcgi_pass   127.0.0.1:9000;
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking for the simplest php framework that comes integrated with dojo. I
I'm desperately looking for a PHP 5 framework that will work best to develop
I'm looking for a simple-to-learn php framework for an application that is being migrated
I am looking for a framework in php that can give me out of
I'm looking for PHP based search engine framework, that similiar to Compass http://www.compass-project.org/ But
I'm looking for a very, very simple php framework that has a simple mysql
I'm looking for a PHP framework that supports CouchDB pretty well natively, I understand
I'm looking for a simple MVC framework for PHP and would like something that
As a web developer looking to move from hand-coded PHP sites to framework-based sites,
I'm looking for a PHP extension that allows me to connect, bind/listen, send, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.