hosts file for multiple site setup

 

 

For local setup of multiple sites on your server, for test or upgrade purpose:

 

for example:
localhost.yoursite1.com
localhost.yoursite2.com

 

used: Server 2008/OpenSuse

go to:

C:\Windows\System32\drivers\etc

open the hosts file with for example Word pad and add:

127.0.0.1       localhost
 
127.0.0.1       localhost.yoursite1.com
127.0.0.1       localhost.yoursite2.com
 
::1             localhost
 

 

If websites do not show while clean urls are enabled on OpenSuse

change localhost.yoursite1.com.conf in etc\apache2\vhost.d

<Directory /srv/www/_sitedir_>
AllowOverride ALL
Require all granted

</Directory>