Direct localhost displays 404, but localhost/test.php can open the file. What's going on?
I searched on Baidu and said I should comment out this sentence. I commented it out and restarted it, but it still didn’t work. I used wamp
#Include conf/extra/httpd-vhosts.conf
The root directory of the website is generally the www directory. Does it have files such as index.{html, php, htm}? By default, localhost accesses files such as index.{html, php, htm}. If not, a 404 error will be generated, but specify Localhost/test.php will access the specified file.
You haven’t configured a default page, such as index.php