1
回答
nginx "虚拟目录" 问题
华为云实践训练营,热门技术免费实践!>>>   
worker_processes  1;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    gzip  on;
    server {
        listen       80;
        server_name  localhost;
        location / {
            root   e:/php;
            index  index.html index.php index.htm;
        } 

#=======虚拟目录也支持php
location /sqladmin/ {
alias D:/php/phpMyAdmin/;
index index.php index.html index.htm;
}
location ~^/sqladmin/.+\.php$ {
root D:/php/phpMyAdmin;
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME D:/php/phpMyAdmin$fastcgi_script_name;
}
#======
        location ~ \.php$ {
            root           e:/php;
            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   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        } 
    }
}
请帮忙看一下 http://localhost/ 正常 http://localhost/sqladmin/ 提示 No input file specified.
举报
五味格子
发帖于6年前 1回/1K+阅
顶部