Symfony框架安装406无法接受的错误瓦特/的cPanel&安培;南国 [英] Symfony framework install 406 Not Acceptable Error w/CPanel & WHM

查看:254
本文介绍了Symfony框架安装406无法接受的错误瓦特/的cPanel&安培;南国的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我想把你的Symfony我的服务器上按照以下安装说明工作。

So I am trying to get Symfony working on my server by following these install instructions.

http://symfony.com/doc/current/book/installation.html#book-installation-permissions

我的地方,我在在,我想安装在框架的目录,控制台运行此命令的一部分。

I got to the part where I ran this command in console in the directory where I wanted the framework to be installed.

symfony的新my_project_name

symfony new my_project_name

我再接着这些说明来设置我的Web根目录/网络,因为我相信我应该怎么办?

I then followed these instructions to set my web root directory to /web as I believe I'm supposed to do?

它正确安装所有的文件,因为我可以看到他们的文件夹中。我确信重新启动Apache和我敢肯定文档根在正确的位置。

It installed all the files correctly since I can see them in the folder. I made sure to restart apache and I'm positive document root is in the correct location.

的http:// tecadmin。净/如何对变化文档根的-主要网域在的cPanel /#

在我这样做,我应该能够测试安装,但似乎没有任何不同之处在于406错误发生?

Once I did this I was supposed to be able to test the installation, but nothing seems to happen except that 406 error?

这是确切的错误我得到的。

This is the exact error I get.

An appropriate representation of the requested resource /app.php could not be found on this server.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

我不知道自己还能做什么。

I'm not sure what else to do.

请注意,因为我使用的 CPANEL 我无法改变的Apache的虚拟主机配置如果是这样的问题,所以我在寻找一个特定的cPanel答案。谢谢!

Please note, that since I'm using CPANEL I can't change the virtual host configurations of apache if that is the issue, so I'm looking for a CPanel specific answer. Thank you!

推荐答案

好了,所以我终于想通了做什么,我有2个问题。因为我的'根'用户安装的,我不得不对symfony的安装运行以下命令。

Okay so I finally figured out what to do, I had 2 problems. Because I installed as the 'root' user I had to run the following command on the symfony installation.

CHOWN -R devdistribution:devdistribution

chown -R devdistribution:devdistribution .

在我的情况,我的用户名是devdistribution但你只要把你自己的。确保做到这一点的顶层不仅仅是/ Web文件夹。

In my case, my username is devdistribution but you would just put your own. Make sure to do this on the top level not just the /web folder.

我知道这是错误之一,因为Apache日志说,这些方针的东西。

I knew this was one of the errors because the apache log said something along these lines

目标UID(520)和文件的UID(501)之间的不匹配/home/devdistribution/public_html/distribution_tech/web/app.php

Mismatch between target UID (520) and UID (501) of file "/home/devdistribution/public_html/distribution_tech/web/app.php"

这固定的500错误,但不是406要解决406错误,你需要登录到WHM和类型的ModSecurity找到它在搜索领域。

This fixed the 500 error, but not the 406. To fix the 406 error you need to login into WHM and type modsecurity to find it in the search field.

转到配置选项,你会看到这一点。

go to the configuration option for it, you will see this.

Rules Engine SecRuleEngine 
This setting controls the behavior of the rules engine.
 Process the rules.
 Do not process the rules.
 Process the rules in verbose mode, but do not execute disruptive actions.

选择不处理规则。然后保存在底部。这个固定的问题,对我来说,我能看到开幕symfony的屏幕!

Select 'Do not process the rules'. Then save at the bottom. This fixed the issue for me and I was able to see the opening symfony screen!

不过,这个我敢肯定留下安全漏洞现在...所以我还需要在处理mod安全用symfony在这种情况下,如果有人知道正确的方式帮助吗?我将做一个单独的问题这一点。

However, this I'm sure leaves security vulnerabilities now...so I still need help on the proper way to handle mod security with symfony in this case if anyone knows? I'll make a separate question for this.

这篇关于Symfony框架安装406无法接受的错误瓦特/的cPanel&安培;南国的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆