Symfony: why is my main page example.com/web instead of example.com (as it should be?)

左心房为你撑大大i 提交于 2019-12-25 03:55:38

问题


My directory tree looks something like this:

public_html
  example.com(containing symfony files)
    lib
    web
    app 
    etc...
  example.net
  example1.com
  example1.net

When I access my site via example.com it just shows my directory tree under the folder example.com, instead of routing to my actual homepage. How do I fix this?


回答1:


You should place all files (except the web directory) in the directory directly above the web directory. Then create a symlink public_html to your web directory, or add the files to your public_html, and then in your ProjectConfiguration call $this->setWebDir(realpath('../public_html'));



来源:https://stackoverflow.com/questions/7383888/symfony-why-is-my-main-page-example-com-web-instead-of-example-com-as-it-shoul

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!