You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wiki-changes@httpd.apache.org by Apache Wiki <wi...@apache.org> on 2007/12/13 13:55:27 UTC
[Httpd Wiki] Update of "VirtualHostsOnMultipleIPs" by jink
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Httpd Wiki" for change notification.
The following page has been changed by jink:
http://wiki.apache.org/httpd/VirtualHostsOnMultipleIPs
New page:
# make apache listen to the right ports and bind it to the ips you want it to listen on:
Listen 10.1.1.1:80
Listen 10.1.1.1:443
Listen 10.1.1.2:80
Listen 10.1.1.2:443
# SSL can't do name based virtualhosting, only ip based, so no need for them here
# make the http ports name based virtualhosts:
NameVirtualHost 10.1.1.1:80
NameVirtualHost 10.1.1.2:80
# define a catch-all virtualhosts for non-listed servernames.
# this site could have a page saying: "No site configured at this address"
<VirtualHost 10.1.1.1:80>
ServerName 10.1.1.1.domain.com
DocumentRoot /path/to/catchall
</VirtualHost>
<VirtualHost 10.1.1.2:80>
ServerName 10.1.1.2.domain.com
DocumentRoot /path/to/catchall
</VirtualHost>
# now the real virtualhosts:
<VirtualHost 10.1.1.1:80>
ServerName www.A.com
DocumentRoot /path/to/www.A.com
</VirtualHost>
<VirtualHost 10.1.1.1:80>
ServerName sub.A.com
DocumentRoot /path/to/sub.A.com
</VirtualHost>
# next ip
<VirtualHost 10.1.1.2:80>
ServerName www.B.com
DocumentRoot /path/to/www.B.com
</VirtualHost>
<VirtualHost 10.1.1.2:80>
ServerName sub.B.com
DocumentRoot /path/to/sub.B.com
</VirtualHost>
# SSL hosts:
<VirtualHost 10.1.1.1:443>
ServerName secure.A.com
DocumentRoot /path/to/secure.A.com
# SSL options, like certificates
</VirtualHost>
<VirtualHost 10.1.1.2:443>
ServerName secure.B.com
DocumentRoot /path/to/secure.B.com
# SSL options, like certificates
</VirtualHost>