Home >Backend Development >PHP Tutorial >May I ask what is wrong with the configuration of my local virtual host?
The configuration is as shown in the figure, www.tp5.com
has been configured locally
I have many virtual hosts configured locally, and they can all be accessed normally. The configuration of my new tp5
virtual 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.php
it’s obviously there
The configuration is as shown in the figure, www.tp5.com
has been configured locally
I have many virtual hosts configured locally, and they can all be accessed normally. The configuration of my new tp5
virtual 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.php
it’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>