You need a reverse proxy seating on the host machine.
there are several good ones. Apache with mod_proxy for example:
<VirtualHost external_IP:80>
ServerName cust1.dev.domain.com
ServerAdmin [email protected]
ProxyRequests off
ProxyPreserveHost on
ProxyPass / http://192.168.0.100/
ProxyPassReverse / http://192.168.0.100/
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
ErrorLog /var/log/apache2/cust1.dev.domain.com.log
CustomLog /var/log/apache2/cust1.dev.domain.com.err.log combined
</VirtualHost>
<VirtualHost external_IP:80>
ServerName cust2.dev.domain.com
ServerAdmin [email protected]
ProxyRequests off
ProxyPreserveHost on
ProxyPass / http://192.168.0.101/
ProxyPassReverse / http://192.168.0.101/
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
ErrorLog /var/log/apache2/cust2.dev.domain.com.log
CustomLog /var/log/apache2/cust2.dev.domain.com.err.log combined
</VirtualHost>
Or you could do it with nginx:
upstream vm1 {
server 192.168.1.100:80; #VM1
}
upstream vm2 {
server 192.168.1.101:80; #VM2
}
## Start VM1 ##
server {
listen external_IP:80;
server_name www.example.com;
access_log /var/log/nginx/log/www.example.access.log main;
error_log /var/log/nginx/log/www.example.error.log;
root /usr/share/nginx/html;
index index.html index.htm;
## send request back to apache1 ##
location / {
proxy_pass http://vm1;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
## START VM2 ##
server {
listen external_IP:80;
server_name static.example.com;
access_log /var/log/nginx/log/static.example.com.access.log main;
error_log /var/log/nginx/log/static.example.com.error.log;
root /usr/local/nginx/html;
index index.html;
location / {
proxy_pass http://vm2;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host static.example.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}