Im wanting to set up my local xampp server in a particular way. For each individual project i create in my document root, i want to be able to access it via http://projectname.localhost. How do i go about doing this with virtual hosts. Do i need to edit windows host file for every new project i create?
| |||
|
feedback
|
|
Yes, you will need to edit the windows host file for every new project. The windows host file does not allow wildcard subdomains. If it is very important to you, you can run your own DNS server and setup TCP/IP to use 127.0.0.1 for DNS. You can use mod_vhost_alias to configure the virtual host in Apache dynamically. Something like...
| |||
|
feedback
|
