配置访问 /phpymadmin/ 实际访问是 的内容 d:/wamp/apps/phpmyadmin4.1.14/phpmyadmin/ ,
调试了很久,最终才实现。
其实我本来phpmyadmin/是直接存放在 d:/wamp/apps/phpmyadmin4.1.14/,但是发现根本无法实现,最后把 d:/wamp/apps/phpmyadmin4.1.14/全部 移动到他自己目录下新建的 phpmyadmin文件夹、再将 location ~ \.php$ 拷贝到 location /phpmyadmin 里面才实现。
如果有更好的实现方法,欢迎交流 [email protected]
server { listen 80; server_name localhost 127.0.0.1 192.168.100.*; root d:/localhost; index index.html index.htm index.php; autoindex on; autoindex_exact_size off; autoindex_localtime on; location /phpmyadmin { root d:/wamp/apps/phpmyadmin4.1.14; location ~ \.php$ { try_files $uri =404; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } location ~ \.php$ { try_files $uri =404; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } location ~ /\.(ht|svn|git) { deny all; } }
时间: 2024-10-19 19:55:34