我遇到500内部服务器错误的问题。这是故事
这是我的htaccess文件
RewriteEngine on
RewriteCond $1 !^(index\.php|assets|css|js|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
这是我的CI配置文件
$config['base_url'] = '';
$config['index_page'] = '';
当我尝试访问我的网站时检查了我的cpanel错误日志。它显示如下:
[Sat May 12 20:48:23 2012] [error] [client 180.247.155.67] SoftException in Application.cpp:254: File "/home/*****/public_html/sipr/index.php" is writeable by group
[Sat May 12 20:48:23 2012] [error] [client 180.247.155.67] SoftException in Application.cpp:254: File "/home/*****/public_html/sipr/index.php" is writeable by group
[Sat May 12 20:48:21 2012] [error] [client 180.247.155.67] SoftException in Application.cpp:254: File "/home/*****/public_html/sipr/index.php" is writeable by group
[Sat May 12 20:48:21 2012] [error] [client 180.247.155.67] SoftException in Application.cpp:254: File "/home/*****/public_html/sipr/index.php" is writeable by group
[Sat May 12 20:48:20 2012] [error] [client 180.247.155.67] SoftException in Application.cpp:254: File "/home/*****/public_html/sipr/index.php" is writeable by group
[Sat May 12 20:48:20 2012] [error] [client 180.247.155.67] SoftException in Application.cpp:254: File "/home/*****/public_html/sipr/index.php" is writeable by group
我尝试通过localhost访问我的网站,它运行正常。我的本地站点地址是
http://localhost/sipr/
答案 0 :(得分:3)
Apache不会运行任何人可读写的公共文件夹中的代码(CHMOD 777)。
我建议您将DOCUMENT_ROOT
放在主文件夹之外的某个位置。 /var/www/
,/srv/www/htdocsc
或您操作系统的默认值。
备份解决方案是将您的访问设置设置为Apache标准(并使其不可写入组):CHMOD -R 775 sipr
答案 1 :(得分:0)
非常感谢Zenbait,你的建议很棒。现在,我的网站运行正常。
首先,我尝试将访问设置更改为775,就像你说的那样,但它不起作用。所以,我在/ public_html /文件夹之外创建了另一个子域。我在/home/my_username/raport/
中设置了它。我将我的网站放在该文件夹中,并尝试访问它。它有效!!