How to access Virtual hosts with ip?

jamsheer

Active Member
#1
I setup the virtual hosts with "name based virtual hosting" and are working properly while typing the domain names in browser. I would like to access virtual hosts by calling IP. How can I do that?

Thanks!
 
#2
Using the WebAdmin Console, go to "Listeners", click your virtual host, and put the IP address in the "Domains" under "Virtual Host Mappings" (the bottom menu)

Or, just edit /usr/local/lsws/conf/httpd_config.conf directly
listener [your virtual host nickname} {
address ...
...
map 123.123.123.123, www.yourdomaincom, yourdomain.com
}

Hope it helps...
(p.s: you will break the SSL if you use https)
dk
 
#4
Is this still valid? How to do it if server having more than 1 virtual host?

I want IP to open website A directly whereas B and C will open via domain name only.
 
Top