I have achieved setting up multiple virtual NIC in 1 VM, and bind websites to different IP on 1 server, e.g., access 2 websites by:
http://10.188.2.150 http://10.188.2.152 <--both IPs belong to the same server
The drawback is that in virutalbox, 1 VM can have 4 network card maximum.
Then, I am trying out the following: get 2 websites bind to the same IP address but different ports, so that I can access the 2 websites like this:
(I have checked that these 2 ports are not in use by 'lsof -i :[port]')
But I cannot access the website by opening, e.g. :
I set up my httpd.conf like this:
Listen 10.188.2.150:8003 Listen 10.188.2.152:8004 <VirtualHost 10.188.2.150:8003> ServerName 10.188.2.150:8002 ServerAdmin admin@localhost DocumentRoot /var/www/html/panda-web/html <Directory /var/www/html/panda-web/html> AllowOverride All </Directory> RewriteEngine On RewriteOptions Inherit </VirtualHost> <VirtualHost 10.188.2.150:8004> ServerName 10.188.2.150:8004 ServerAdmin admin@localhost DocumentRoot /var/www/html/sheep-web/html <Directory /var/www/html/sheep-web/html> AllowOverride All </Directory> RewriteEngine On RewriteOptions Inherit </VirtualHost>
I've looked apache website but I must have missed something? Has anyone tried this?