I've got Apache 2.28, on Web-Developer Server Suite, PHP 5.38, MySQL latest version, and have got about 5 virtualhosts.
This is my latest virtual host, which was a dynamic one:
UseCanonicalName Off NameVirtualHost *:80 <VirtualHost *:80> ServerName www.my-goods-distributor.co.uk ServerAlias my-goods-distributor.co.uk DocumentRoot /www/my-goods-distributor.co.uk ScriptAlias /cgi-bin/ /www/my-goods-distributor.co.uk/bin </VirtualHost>
I added it to hosts and it took me to localhost's page instead. Normally after adding virtual hosts I use cmd, and type in httpd -k restart (graceful restart) which does it, but I want to try and automate this process a bit.
I did try what was in the documentation, but I'm new to this.
How should/can I get Apache to add virtualhosts without restarting the server by hand, like webhosting companies do, even though I'm using Windows and a hosts file? I don't think the major webhost companies turn the servers on and off by hand, and my server, although it's a testing one, is intended to replicate some functions of PHP/MySQL before any sites go live on other webhosts.
Any advice is appreciated, thanks!