I
I
Ilya2014-12-03 03:07:18
Nginx
Ilya, 2014-12-03 03:07:18

How to run symfony2 on nginx?

Trouble running symphony2 on nginx. I am using a local winginx server. Set it up like this:

server {
  listen 127.0.0.1:80;
  server_name cvet.loc www.cvet.loc;

  root home/cvet.loc/public_html;
  index index.php index.html app.php app_dev.php;

  charset utf-8;
  
  location / {
    		try_files $uri $uri/ /app_dev.php?$args;
    	}

  location ~ ^/(app|app_dev|config)\.php(/|$) {
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
    include fastcgi_params;
    	}


}

But when accessing the application: No input file specified.
I googled that I need cgi.fix_pathinfo=1. Installed but still the same error.
nginx logs:
2014/12/03 03:17:14 [crit] 6464#4308: *9 GetFileAttributesEx() "D:\dev\winginx/home/cvet.loc/public_html/web/app_dev.php/" failed (123: The filename, directory name, or volume label syntax is incorrect), client: 127.0.0.1, server: cvet.loc, request: "GET /web/app_dev.php/ HTTP/1.1", host: "cvet.loc"

Tell me where to dig. Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2014-12-03
@Nc_Soft

fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question