Hey,
Is there a quick answer to being able to construct multiple virtual localhosts given a particular directory using apache?
i.e. rather than having to change httpd.conf every time I want to work on a different site (since they all use /, they need to be set as DocumentRoot
I'd like some way of them retaining the qualities of root, but allowing apache to run all the time while serving all sites.
Got me?
Apache - virtual hosts
Moderator: Thought Police
Apache - virtual hosts
Kajun is awaiting approval.
Got there in the end.
Two real solutions:
a) set 'NameVirtualHost 127.0.0.1', setup up lots of VirtualHosts to correspond and give them ServerName.s, then map the same names to 127.0.0.1 in your Hosts file. (more info).
b) run multiple instances of apache specifying a different config file each time using the '-f' CLI parameter. Set each 'site' to a different port and remember which is which.
There are advantages to each - the first is perfect for a non-hotdesking setup where you just use one machine, i.e. my home one. The second is perfect to stick on my keys and carry around, because otherwise you have to modify the HOSTS file on every machine: with the keys I can just run multiple instances (or more usually, just the one I'm developing).
Excellent piece of software; terrible piece of documentation.
Two real solutions:
a) set 'NameVirtualHost 127.0.0.1', setup up lots of VirtualHosts to correspond and give them ServerName.s, then map the same names to 127.0.0.1 in your Hosts file. (more info).
b) run multiple instances of apache specifying a different config file each time using the '-f' CLI parameter. Set each 'site' to a different port and remember which is which.
There are advantages to each - the first is perfect for a non-hotdesking setup where you just use one machine, i.e. my home one. The second is perfect to stick on my keys and carry around, because otherwise you have to modify the HOSTS file on every machine: with the keys I can just run multiple instances (or more usually, just the one I'm developing).
Excellent piece of software; terrible piece of documentation.

Kajun is awaiting approval.