Nginx for Symfony

John Huong jahuong at acme2u.com
Sun May 25 18:13:43 MSD 2008


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