window下phpstudy配置虚拟主机报错No input file specified

1、点击phpstudy中的切换版本,切换到nginx下

2、打开vhost文件

server {
        listen       80;
        server_name  www.test.com;
        root   "E:\phpPro\test";
        location / {
            index  index.html index.htm index.php;
            #autoindex  on;
            if ($request_filename !~ (static|robots/.txt|index/.php.*)) {
                rewrite ^/(.*)$ /index.php?$1 last;
                break;
                }

        }
        location ~ \.php(.*)$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_split_path_info  ^((?U).+\.php)(/?.+)$;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            fastcgi_param  PATH_INFO  $fastcgi_path_info;
            fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;
            include        fastcgi_params;
        }
}

配置虚拟主机后访问网址,结果报错如下

将反斜杠改为正斜杠

重启nginx后即可正常访问

发布了42 篇原创文章 · 获赞 10 · 访问量 6万+

猜你喜欢

转载自blog.csdn.net/huihuikuaipao_/article/details/103068784
今日推荐