Saturday, November 11, 2017

windows - Mapping Virtual Hosts by folder name in Apache

I am trying to add virtual hosts to my Apache, but I am trying to do it in a specific way of which I don't know if it is possible.



I currently have it like this:




ServerName til.local
DocumentRoot "C:/xampp/htdocs/til"

Options FollowSymLinks
AllowOverride All


Order allow,deny
Allow from all




Where "til" is the name of the folder AND of the 'domain name'.



I want to set something up once so I don't need to look at it anymore afterwards, even when adding new folders to the htdocs folder. I am going to create a lot of different domains in a short period of time so I don't want to go to the apache settings every single time I add a virtual host. Is it possible to set something up that haves all folders in the htdocs automatically be a domain name like this? So if I put abc as a folder, it uses "abc.local" and the folder "htdocs/abc"?

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...