localhost 目录 c:/localhost
phpmyadmin 目录 c:/phpmyadmin
希望通过访问 http://localhost/phpmyadmin 访问 c:/phpmyadmin
配置nginx
server {
listen 80;
server_name localhost;
root c:/phpmyadmin;
index index.html index.htm index.php;
location /phpmyadmin/ {
root c:/phpmyadmin/;
}
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;
}
}
运行提示404,localhost运行正常。
你说 alias 但是你代码里怎么是root呢?root会带路径的,你可以去看看
logs/error.logs