參考網址:https://www.howtoforge.com/the-perfect-server-ubuntu-14.04-nginx-bind-mysql-php-postfix-dovecot-and-ispconfig3-p3
透過上述參考網址安裝 ubuntu 14.04LTS + ispconifg3 + nginx + php 後,根據文中說明,可以使用 http://domain:8081/phpmyadmin 存取 phpmyadmin 介面,但是一直發生 502 Bad Getaway的錯誤。
使用指令
tail /var/log/nginx/error.log
後發現錯誤如下:
connect() to unix:/var/run/php5-fpm.sock failed (2: No such file or directory) while connecting to upstream
發現是 /var/run/php5-fpm.sock這個檔案不存在造成的,網路上建議修改方式為
1. 修改 /etc/php5/fpm/pool.d/www.conf 內
listen = /var/run/php5-fpm.sock
變成
listen = 127.0.0.1:9000
參考網址:https://wildlyinaccurate.com/solving-502-bad-gateway-with-nginx-php-fpm/
修改過後還是無法存取 phpmyadmin,錯誤訊息依舊是
connect() to unix:/var/run/php5-fpm.sock failed (2: No such file or directory) while connecting to upstream
fastcgi_pass unix:/var/run/php5-fpm.sock;
將上述定義改成
fastcgi_pass 127.0.0.1:9000;
並重啟 server
sudo service nginx restart
問題解決!!!
如果在log中看到
請執行以下指令修改權限
chmod 660 /usr/local/ispconfig/interface/lib/config.inc.php
沒有留言:
張貼留言