Symfony on virtual host (document root problem)

Posted by Martin Sikora on Stack Overflow See other posts from Stack Overflow or by Martin Sikora
Published on 2010-05-11T10:18:10Z Indexed on 2010/05/11 10:24 UTC
Read the original article Hit count: 158

Filed under:
|
|
|

Hello, I'm developing an application in Symfony and on localhost (XAMPP) I want to simulate the same conditions as on the webserver.

The web server is configured as follows:

/www   => mydomain.com
/foo   => foo.mydomain.com
/bar   => bar.mydomain.com
...

I'm going to put my Symfony application into /www direcotry so there'll be:

/www
/www/apps
/www/apps/frontend
/www/apps/frontend/...
/www/apps/backend
/www/apps/backend/...
/www/cache
/www/config
... and so on...
/www/web

The thing is that the document root is still set to the /www directory but Symfony expects it in the /www/web.
Of course it will work if I call http://mydomain.com/web but I guess you understand this is quiet stupid solution.

So my question is: Is there any way how can I change/bypass the default document root setting using .htaccess or whatever?

© Stack Overflow or respective owner

Related posts about php

Related posts about symfony