简体   繁体   English

将 symfony 从根目录移动到 public_html

[英]move symfony from root directory to public_html

I have a symfony2 project that somehow was running fine while it was outside the public_html directory, but now it's not working (the path is not allowed anymore, apparently).我有一个 symfony2 项目,它在 public_html 目录之外时以某种方式运行良好,但现在它不起作用(显然不再允许该路径)。

Now I need to move the symfony2 directory into public_html, but when I do, the website is still not working (the page is blank).现在我需要将 symfony2 目录移动到 public_html 中,但是当我这样做时,该网站仍然无法正常工作(页面为空白)。

I modified app.php so the include path is the correct one, and I also modified the projectConfiguration class so it has the right WebDir.我修改了 app.php,所以包含路径是正确的,我还修改了 projectConfiguration 类,所以它有正确的 WebDir。 What am I missing?我错过了什么?

alternatively, how can I make it work outside the public_html directory?或者,如何使其在 public_html 目录之外工作?

for the record, I'm completely new to symfony.为了记录,我对 symfony 完全陌生。

Please insert here your virtualHosts configuration from apache configuration files. 请在此处从apache配置文件中插入您的virtualHosts配置。 I think there are missing some permissions on the directory. 我认为目录缺少某些权限。 Or you have changed something in .htaccess 或者您已经更改了.htaccess中的内容

The cache was the culprit.缓存是罪魁祸首。 I cleaned symfony's cache (removed all the contents residing in the cache folder) and the website came back to normal.我清理了 symfony 的缓存(删除了缓存文件夹中的所有内容),网站恢复正常。

thanks to fos.alex for the comment/answer.感谢 fos.alex 的评论/回答。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM