从本地移动到服务器后网站无法正常工作

时间:2015-06-04 12:08:37

标签: php .htaccess codeigniter server

我正在使用codeigniter 2.2而我的操作系统是ubuntu 14.04。我在localhost上使用codeigniter开发了一个网站。它工作正常。

现在我已将网站移至真实服务器http://hotlunchorders.com/。我收到了错误。

  

内部服务器错误服务器遇到内部错误或配置错误,无法完成您的请求。请联系服务器管理员webmaster@hotlunchorders.com,告知他们错误发生的时间,以及可能导致错误的任何操作。

     

服务器错误日志中可能提供了有关此错误的更多信息。   此外,尝试使用ErrorDocument处理请求时遇到500内部服务器错误错误。

我的.htaccess文件

    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule .* index.php/$0 [PT,L] 

服务器中的错误日志文件

    [Thu Jun 04 08:00:35 2015] [error] [client 67.213.90.137] SoftException in Application.cpp:256: File "/home/hotlunchorders/public_html/index.php" is writeable by group
    [Thu Jun 04 08:00:35 2015] [error] [client 67.213.90.137] SoftException in Application.cpp:256: File "/home/hotlunchorders/public_html/index.php" is writeable by group
    [Thu Jun 04 07:59:57 2015] [error] [client 67.213.90.137] File does not exist: /home/hotlunchorders/public_html/404.shtml, referer: http://hotlunchorders.com/beta/index.php/profile/index
    [Thu Jun 04 07:59:57 2015] [error] [client 67.213.90.137] File does not exist: /home/hotlunchorders/public_html/beta/assets/css/global-style-color-icon.css, referer: http://hotlunchorders.com/beta/index.php/profile/index
    [Thu Jun 04 07:59:54 2015] [error] [client 67.213.90.137] File does not exist: /home/hotlunchorders/public_html/404.shtml, referer: http://hotlunchorders.com/beta/index.php/home/index
    [Thu Jun 04 07:59:54 2015] [error] [client 67.213.90.137] File does not exist: /home/hotlunchorders/public_html/beta/assets/css/global-style-color-icon.css, referer: http://hotlunchorders.com/beta/index.php/home/index
    [Thu Jun 04 07:59:49 2015] [error] [client 67.213.90.137] File does not exist: /home/hotlunchorders/public_html/404.shtml, referer: http://hotlunchorders.com/beta/index.php/order/step4/cod
    [Thu Jun 04 07:59:49 2015] [error] [client 67.213.90.137] File does not exist: /home/hotlunchorders/public_html/beta/assets/css/global-style-color-icon.css, referer: http://hotlunchorders.com/beta/index.php/order/step4/cod
    [Thu Jun 04 07:59:42 2015] [error] [client 67.213.90.137] File does not exist: /home/hotlunchorders/public_html/404.shtml, referer: http://hotlunchorders.com/beta/index.php/order/step3
    [Thu Jun 04 07:59:42 2015] [error] [client 67.213.90.137] File does not exist: /home/hotlunchorders/public_html/beta/assets/css/global-style-color-icon.css, referer: http://hotlunchorders.com/beta/index.php/order/step3
    [Thu Jun 04 07:59:30 2015] [error] [client 67.213.90.137] File does not exist: /home/hotlunchorders/public_html/404.shtml, referer: http://hotlunchorders.com/beta/index.php/order/step2
    [Thu Jun 04 07:59:30 2015] [error] [client 67.213.90.137] File does not exist: /home/hotlunchorders/public_html/beta/assets/css/global-style-color-icon.css, referer: http://hotlunchorders.com/beta/index.php/order/step2
    [Thu Jun 04 07:59:26 2015] [error] [client 67.213.90.137] File does not exist: /home/hotlunchorders/public_html/404.shtml, referer: http://hotlunchorders.com/beta/index.php/order/step1
    [Thu Jun 04 07:59:26 2015] [error] [client 67.213.90.137] File does not exist: /home/hotlunchorders/public_html/beta/assets/css/global-style-color-icon.css, referer: http://hotlunchorders.com/beta/index.php/order/step1
    [Thu Jun 04 07:58:07 2015] [error] [client 67.213.90.137] File does not exist: /home/hotlunchorders/public_html/500.shtml
    [Thu Jun 04 07:58:07 2015] [error] [client 67.213.90.137] SoftException in Application.cpp:256: File "/home/hotlunchorders/public_html/index.php" is writeable by group
    [Thu Jun 04 07:58:05 2015] [error] [client 67.213.90.137] File does not exist: /home/hotlunchorders/public_html/404.shtml, referer: http://hotlunchorders.com/beta/index.php/profile/index

有人可以帮我解决这个问题。 TNX。

1 个答案:

答案 0 :(得分:0)

要点:

  1. 是否启用了rewrite模块?由sudo a2enmod rewrite启用。
  2. 路径是否正确? Linux is case sensitive
  3. 可按组写入可指出权限问题。尝试将权限集更改为sudo chmod 0750各自的文件和目录。
相关问题