Nginx for Symfony

Kiril Angov kupokomapa at gmail.com
Mon May 26 11:42:21 MSD 2008


John, I suggest you run sumfony under apache to begin with as it seems
you are trying two big things at the same time and you will just go in
circles.

http://myhostname/myproject/mymodule/index.php

The above is not how the routing in Symfony works. Try
http://myhostname/myproject/mymodule or
http://myhostname/myproject/mymodule/index

Kupo

On Sun, May 25, 2008 at 10:13 AM, John Huong <jahuong at acme2u.com> wrote:
> myproject is a folder under /var/www/nginx-default
>
>
>
> server {
>       listen       9891;
>       server_name  localhost myserver;
>
>       #charset koi8-r;
>
>       #access_log  logs/host.access.log  main;
>
>       location / {
>           root   /var/www/nginx-default;
>           index  index.html index.htm index.php;
>       }
>
>       location /myproject/
>       {
>          rewrite ^(.*) index.php last;
>       }
>
>       location /myproject/sf/ {
>       root /usr/share/php/data/symfony/web/sf/;
>       }
>       #
>       location ~ \.php($|/) {
>       #    root           html;
>           fastcgi_pass   127.0.0.1:9000;
>           fastcgi_index  index.php;
>           fastcgi_param  SCRIPT_FILENAME
>  /var/www/nginx-default$fastcgi_script_name;
>           include        fastcgi_params;
>       }
>
>       # deny access to .htaccess files, if Apache's document root
>       # concurs with nginx's one
>       #
>       #location ~ /\.ht {
>       #    deny  all;
>       #}
>   }
> Aleksandar Lazic wrote:
>>
>> On Son 25.05.2008 08:43, John Huong wrote:
>>>
>>> Ok here is one part:
>>>
>>>
>>> 2008/05/25 00:46:08 [error] 4421#0: *5 open()
>>> "/usr/share/php/data/symfony/web/sf/myproject/sf/sf_default/images/icons/ok48.png"
>>> failed (2: No such file or directory), client: 192.168.11.86, server:
>>> localhost, request: "GET /myproject/sf/sf_default/images/icons/ok48.png
>>> HTTP/1.1", host: "10.1.1.88:9891", referrer:
>>> "http://10.1.1.88:9891/myproject/index.php"
>>
>> and now the conf.
>>
>>
>>
>
>
>





More information about the nginx mailing list