Multiple virtual hosts on localhost for development

I am using Xampp (Apace 2.2.20) for mac os lion for development. I have several CMS projects and I want to access them by going to cms1.localhost, cms2.localhost, cms3.localhost, etc.

Currently, with the setup I have below, everything goes to everything in the first directive of virtual hosts, i.e. (/ Applications / XAMPP / migration / trunk).

Can someone point me in the right direction. I can’t think of what else to do in terms of debugging, etc., so that help will also be useful. Thank you very much.

<VirtualHost *:80> ServerName localhost DocumentRoot "/Applications/XAMPP/migration/trunk" </Virtualhost> <VirtualHost *:80> ServerName rix.localhost DocumentRoot "/Applications/XAMPP/projects/giving" </Virtualhost> 

In / etc / hosts I have

 127.0.0.1 localhost 127.0.0.1 rix.localhost 
+4
source share
1 answer

To troubleshoot, try exchanging VirtualHost ads, make sure the file is correct, and restart Apache.

They are all simple things, but it is better to check them first.

0
source

Source: https://habr.com/ru/post/1383955/


All Articles