Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Virtual Servers, Multiple Domains, 1 IP

Status
Not open for further replies.
Nov 29, 2000
1
US
Is there a way to have (example) 3 domains, and sub domains for each? all on 1 ip address.

domain1.com
hello.domain1.com
helloagain.domain1.com

domain2.com
testing.domain2.com
again.domain1.com

domain3.com
help.domain3.com
web.domain3.com
 
A week and no one's responded yet? :)

There certainly is -- it's a combination of the NameVirtualHost, <VirtualHost>, ServerName and ServerAlias directives ... along with some name server (bind) modifications.

Somewhere in httpd.conf
# x's are your IP address
NameVirtualHost xxx.xxx.xxx.xxx

<VirtualHost xxx.xxx.xxx.xxx>
ServerName domain1.com
ServerAlias domain1.com hello.domain1.com helloagain.domain1.com
# .. etc .. keep repeating this configuration for the
# other domains. Leave xxx.xxx.xxx.xxx the same for each.
</VirtualHost>

Okay... in your forward DNS file for domain1.com, you'll also have something like:

hello CNAME domain1.com.
helloagain CNAME domain1.com.

Which just makes the subdomains aliased to the main ip address.

Hope this helps,

brendanc@icehouse.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top