我已经在我的ubuntu 16.04服务器上安装了nginx,php7.0-fpm和mysql。 一切工作正常但是它不加载phpmyadmin的设置页面。 下面是我的phpmyadmin nginx块。
location /phpmyadmin { root /usr/share/; index index.php index.html index.htm; location ~ ^/phpmyadmin/(.+\.php)$ { try_files $uri =404; #fastcgi_pass 127.0.0.1:9000; fastcgi_pass unix:/run/php/php7.0-fpm.sock; include fastcgi_params; } }
以下是我的nginx访问日志
/usr/share# tail -f /var/log/nginx/access.log 127.0.0.1 - - [15/Oct/2016:17:13:06 +0530] "GET /phpmyadmin/setup/index.php HTTP/1.1" 200 31 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0" 127.0.0.1 - - [15/Oct/2016:17:13:06 +0530] "GET /phpmyadmin/setup/index.php HTTP/1.1" 200 31 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0" 127.0.0.1 - - [15/Oct/2016:17:13:41 +0530] "GET /phpmyadmin/setup/index.php HTTP/1.1" 200 31 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0" 127.0.0.1 - - [15/Oct/2016:17:13:44 +0530] "GET /phpmyadmin/setup/index.php HTTP/1.1" 200 31 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0" 127.0.0.1 - - [15/Oct/2016:17:13:46 +0530] "GET /phpmyadmin/setup/index.php HTTP/1.1" 200 31 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0" 127.0.0.1 - - [15/Oct/2016:17:13:46 +0530] "GET /phpmyadmin/setup/index.php HTTP/1.1" 200 31 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0" 127.0.0.1 - - [15/Oct/2016:17:13:47 +0530] "GET /phpmyadmin/setup/index.php HTTP/1.1" 200 31 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0" 127.0.0.1 - - [15/Oct/2016:17:13:47 +0530] "GET /phpmyadmin/setup/index.php HTTP/1.1" 200 31 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0" 127.0.0.1 - - [15/Oct/2016:17:21:26 +0530] "GET /phpmyadmin/setup/index.php HTTP/1.1" 200 31 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0" 127.0.0.1 - - [15/Oct/2016:17:21:28 +0530] "GET /phpmyadmin/setup/index.php HTTP/1.1" 200 31 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
我在nginx错误日志中没有任何东西。 php7.0-fpm也正常运行,下面是日志摘录相同。
tail -f /var/log/php7.0-fpm.log [15-Oct-2016 17:09:48] NOTICE: fpm is running, pid 17062 [15-Oct-2016 17:09:48] NOTICE: ready to handle connections [15-Oct-2016 17:09:48] NOTICE: systemd monitor interval set to 10000ms [15-Oct-2016 17:21:10] NOTICE: Terminating ... [15-Oct-2016 17:21:10] NOTICE: exiting, bye-bye! [15-Oct-2016 17:21:11] NOTICE: configuration file /etc/php/7.0/fpm/php-fpm.conf test is successful [15-Oct-2016 17:21:11] NOTICE: fpm is running, pid 17297 [15-Oct-2016 17:21:11] NOTICE: ready to handle connections [15-Oct-2016 17:21:11] NOTICE: systemd monitor interval set to 10000ms
我需要专家的build议,因为我试图从本地端口9000到php.sock更改php-fpm监听模式。 同样可以在phpmyadmin nginx块configuration中观察到。