Home >Backend Development >PHP Tutorial >May I ask what is wrong with the configuration of my local virtual host?

May I ask what is wrong with the configuration of my local virtual host?

WBOY
WBOYOriginal
2016-07-06 13:52:181030browse

May I ask what is wrong with the configuration of my local virtual host?

The configuration is as shown in the figure, www.tp5.comhas been configured locally
I have many virtual hosts configured locally, and they can all be accessed normally. The configuration of my new tp5virtual host is copied and pasted, so it should not work. A typo or something? But when I visit, it prompts No input file specified., but I am index.php obviously there?

If you use http://localhost/tp/public but you can access it normally, why is this?
I tried tp3.2 and tp5 and both have this problem, index.phpit’s obviously there

Reply content:

May I ask what is wrong with the configuration of my local virtual host?

The configuration is as shown in the figure, www.tp5.comhas been configured locally
I have many virtual hosts configured locally, and they can all be accessed normally. The configuration of my new tp5virtual host is copied and pasted, so it should not work. A typo or something? But when I visit, it prompts No input file specified., but I am index.php obviously there?

If I can access it normally using http://localhost/tp/public, why is this?
I tried tp3.2 and tp5 and both have this problem, index.phpit’s obviously there

I found the reason, it turned out to be the delimiter problem of root...
Just change to /, that is,
E:/phpStudy/WWW/tp/public

What a strange question...

Look at my configuration

<code class="php">listen       80;
    server_name  www.test.com;

    #charset koi8-r;

    #access_log  logs/host.access.log  main;


    location / {
        root   D:/www/php/www.test.com/www;
        index  index.php;


        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        location ~ \.php$ {
            root          D:/www/php/www.test.com/www;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            #fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
            fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }

    }</code>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn