
我有一個專用伺服器。當我使用我的網站時沒有運行 PHP 文件,所以我嘗試查看 apache 並用來service https status
檢查 apache 狀態,這就是我獲得的服務 httpd 狀態
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@mps-vm1 and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
此外,嘗試使用 ErrorDocument 處理請求時遇到 500 Internal Server Error 錯誤。
Apache/2.2.27 (Unix) mod_ssl/2.2.27 OpenSSL/1.0.1e-fipsmod_bwlimited/1.4 Server at localhost Port 80
有人可以告訴我我該做什麼嗎?
答案1
service httpd status
將檢索 Apache 的 /server-status/ 頁面(由 提供mod_status
)。它將通過apachectl status
(或 apache2ctl,如果你使用的是 Debian 或 Ubuntu)來完成此操作
這可能意味著您的配置無法載入。您可以apachectl configtest
在重新載入/重新啟動網路伺服器之前測試設定。
預設情況下,錯誤訊息也可以在(或 ssl_error_log,取決於請求的傳入方式)中找到/var/log/httpd/error_log
。
答案2
所以我透過重新安裝APACHE解決了這個問題。這似乎是唯一的辦法。也許當我更改安裝檔案時,我做了一些非常錯誤的事情並搞亂了 Apache。