我剛在一個託管服務中部署了我的Zend項目。我上傳我的項目作爲檔案,然後在public_html文件夾中提取。所以我有這個目錄:在cPanel中部署Zend Framework時出現內部服務器錯誤
public_hmtl
- >應用程序(文件夾)
- > libary(文件夾)
- >公共(文件夾)
- >測試(文件夾)
- > CGI -bin(文件夾)(這不屬於我擺在首位)
- >構建路徑
- > htaccess的(這不屬於我擺在首位)
- >項目
- > zfproject.xml
- >的index.php(這是重定向到/公共)
當我運行的網站,它表明:
內部服務器錯誤
服務器遇到一個內部錯誤或配置錯誤,並且 無法完成您的請求。
請與服務器管理員[email protected]和 聯繫,通知他們發生錯誤的時間以及您可能已經完成的任何可能導致錯誤的任何事情。
有關此錯誤的更多信息可能在服務器錯誤 日誌中可用。
此外,嘗試使用ErrorDocument處理請求時遇到404未找到錯誤。
我在使用xampp的localhost中完成了項目,它工作正常。但是當我上傳到cPanel時,就變成了這樣。
我已經將文件夾的chmod設置爲755,文件設置爲644.我認爲它與htaccess有關,但我不太清楚如何在cPanel中處理這個問題。
我該怎麼辦?
錯誤日誌顯示是這樣的:
[Sat Sep 10 15:10:39 2011] [error] [client 125.163.228.77] File does not exist: /home/publicusername/public_html/404.shtml
[Sat Sep 10 15:10:39 2011] [error] [client 125.163.228.77] File does not exist: /home/publicusername/public_html/favicon.ico
[Sat Sep 10 15:10:39 2011] [error] [client 125.163.228.77] File does not exist: /home/publicusername/public_html/500.shtml
[Sat Sep 10 15:10:39 2011] [alert] [client 125.163.228.77] /home/publicusername/public_html/public/.htaccess: Invalid command 'SetEnv', perhaps misspelled or defined by a module not included in the server configuration
[Sat Sep 10 15:09:58 2011] [error] [client 125.163.228.77] File does not exist: /home/publicusername/public_html/404.shtml
我的公共/ htaccess的
SetEnv APPLICATION_ENV production
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
我已經設置了SetEnv APPLICATION_ENV
到SetEnv APPLICATION_ENV production
公共/ htaccess的,但還是失敗了。
你檢查錯誤日誌嗎?它說什麼? – Ravi
先請在這裏複製.htaccess文件。第二檢查錯誤日誌中cpnale – undone
SETENV APPLICATION_ENV生產 RewriteEngine敘述在 的RewriteCond%{} REQUEST_FILENAME -s [OR] 的RewriteCond%{} REQUEST_FILENAME -l [OR] 的RewriteCond%{} REQUEST_FILENAME -d 重寫規則^ * $ - [NC,L] RewriteRule ^。* $ index.php [NC,L]我用eror log編輯了這個問題 – psaka