剛裝完 PHP、Nginx,准備跑下 phpMyAdmin 程序,結果報以下錯誤:
An error occurred.
Sorry, the page you are looking for is currently unavailable.
Please try again later.If you are the system administrator of this resource then you should check theerror log for details.
Faithfully yours, nginx.
解決方案:
仔細檢查下 Nginx配置文件,是配置不當造成的!
比如說,我遇到的出錯原因如下:
nginx.conf配置文件有這么一段代碼:
include vhost/*.conf;
它表示包含 vhost 目錄下的所有虛擬機配置文件。在語法上,通過 命令 nginx -t 去檢測,它是沒錯的,但是事實上 vhost文件夾是不存的(忘記建立),所以nginx進程雖然能跑起來,但是前端頁面展示還是報錯的,最后的解決方案 當然是新建 vhost目錄即可!