Nginx for Symfony

John Huong jahuong at acme2u.com
Sat May 24 20:24:14 MSD 2008


In my symfony project's web folder there is a .htaccess file.

For apache I would have a line in that file that is
RewriteBase /myproject

What is equivalent in nginx?

John Huong wrote:
> Hi Aleks,
>
> Thanks for the tip, However, what if I need to have my symfony project 
> hosted at location /myproject/ ?
>
>
>
> Aleksandar Lazic wrote:
>> Hi Denis,
>>
>> On Sam 24.05.2008 21:43, Denis F. Latypoff wrote:
>>>
>>> Saturday, May 24, 2008, 9:18:20 PM, you wrote:
>>
>>>>          location / {
>>> -            root   /home/httpd/virtserver/<DOMAIN>/html;
>>>
>>> -            if ($request_filename !~ 
>>> "\.(js|htc|ico|gif|jpg|png|css|htm)$") {
>>>>              rewrite ^(.*) /index.php last;
>>> -            }
>>> -            index  index.html index.htm;
>>>>          }
>>>
>>> +          location ~ \.(js|htc|ico|gif|jpg|png|css|html?)$ {
>>> +            root   /home/httpd/virtserver/<DOMAIN>/html;
>>> +            index  index.html index.htm;
>>
>> Thank you.
>>
>> Cheers
>>
>> Aleks
>>
>>
>
>
>






More information about the nginx mailing list