centos7 - Nginx doesn't redirect to index.php page of phpmyadmin -
i installed nginx, php-fpm , phpmyadmin. www folder.
[root@vmi67073 etc]# ll /usr/share/nginx/html/ -rw-r--r-- 1 root root 3650 feb 13 18:45 404.html -rw-r--r-- 1 root root 3693 feb 13 18:45 50x.html drwxr-xr-x 3 root root 40 mar 17 06:14 myapp.eu -rw-r--r-- 1 root root 3700 feb 13 18:45 index.html lrwxrwxrwx 1 root root 22 mar 17 06:52 mysql -> /usr/share/phpmyadmin/
my nginx conf file location phpmyadmin under myapp.conf file looks this
location /mysql { alias /usr/share/phpmyadmin; location ~ \.php$ { index index.php index.html index.htm; include fastcgi_params; fastcgi_param script_filename $request_filename; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass 127.0.0.1:9000; } }
problem: if try access myapp.eu/mysql
following error in nginx log
2016/03/17 09:21:01 [error] 2119#0: *28 directory index of "/usr/share/phpmyadmin/" forbidden, client: 84.52.168.135, server: euro-swap.eu, request: "get /mysql/ http/1.1", host: "euro-swap.eu"
but if try access myapp.eu/mysql/index.php
phpmyadmin shown. i'm guessing nginx should somehow redirect index.php page.
what causing problem? how fix it? if need additional information's, please let me know , provide.
when try open myapp.eu/mysql
, being catched outer location
directive. no index defined outer one. solution move index directive there inner location
:
location /mysql { alias /usr/share/phpmyadmin; index index.php index.html index.htm; location ~ \.php$ { include fastcgi_params; fastcgi_param script_filename $request_filename; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass 127.0.0.1:9000; } }
Comments
Post a Comment