Symfony setup without a web folder
I need to setup Symfony on a shared host that runs on windows IIS开发者_C百科. The domain directs to the root folder of the host. Which means no /public_html or /htdocs.
Is there any way to configure Symfony in a way that if I move the contents in "/web" to the root folder of my shared hosting account with the rest of the folders (app, config, tests etc...) , it would still work ?
Yes definitely you can do this.
Just do:
Open - lib\symfony\config\sfProjectConfiguration.class.php
Find - $this->setWebDir($rootDir.DIRECTORY_SEPARATOR.'web');
function
Modify - "web" folder by whatever path or directory you want
On linux, you can do symbolic links to a directory. The windows equivalent of a symlink to the root directory named web would solve your problem I guess...
Symfony on IIS
In the first case, the webserver is only used for our symfony project, and the URL is something like http://myproject/.
Assuming the directory in which you created the directory myapp is c:\myproject\, configure the root directory of your server to be c:\myproject\web (in IIS administration console).
精彩评论