Why do I change it to my own project directory, write my own PHP test file, enter my own domain name, but still access index.php under WWW instead of index.php in my directory?
The domain name needs to have a port number. The default port 80 is the default WWW directory. If you need to change it, you can set it in the port general settings.
Steps to configure a virtual machine
Configure the virtual machine, configure the hosts file, restart apache, and then you can have fun
Are you missing a few steps?
The domain name needs to have a port number. The default port 80 is the default WWW directory. If you need to change it, you can set it in the port general settings.