• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 349
  • Last Modified:

DNS,apache webserver - Webhosting

I have currently have a domain name called panatech.com.au. The webserver is pluto.panatech.com.au. Now I want to be able to do webhosting on pluto.panatech.com.au. If someone with a domain name of paul.com wants to host their website www.paul.com on pluto.panatech.com.au, then how do I setup my apache webserver and DNS server in order to host www.paul.com? The apache webserver is on a linux box and DNS is running on NT 4.0. Thanks in advance.
0
samcumar
Asked:
samcumar
1 Solution
 
edicomCommented:
Ok, so the person who s reserved the paul.com domain should have indicated at least two authoritative DNS for the domain, so they should either point to your DNS where you have to add a zone file for paul.com (and indicate the DNS it should serve this zone), basically this zone file should contain the SOA field, the nameservers for the domain and a CNAME field saying something like:
www.paul.com.      IN      CNAME      name_of_machine_or_interface_for that domain.
OR:
the person has personal DNS servers and they should had your machine as being their www machine.
That s for DNS.
Then on the apache side, you have basically two options:
Either you have dedicated an IP address to this new domain (the CNAME points to another interface than the one for your own domain), so you have to add this address on your machine(using IP aliasing in the kernel you can then use ifconfig on devices like eth0:0 eth0:1 ...)
then in the apache config file, you create a VirtualHost with the IP address you used for paul.com, in thant VirtualHost you can specify the DocumentRoot for paul.com, the log files to be used just like in the main config.
The other option may be more convenient if you plan hosting lots of domain on this machine.
Instead of dedicating IP addresses for each domain, you dedicate one for name virtualhost so you ve to add a line like:
NameVirtualHost ip_address_you_ve_choosen
and then
<VirtualHost ip_address_you_ve_choosen>
        ServerName name_of_the_server
        ServerAdmin ...
        DocumentRoot ...
        ScriptAlias ...
      ...
</VirtualHost>
For each new domain you can reuse the same block above with specific name_of_the_server, which apache will use to choose which pages to send.

You may have to had a Listen ip_address:port for the address you ve added (but normally apache will listen to all addresses, Listen is more used to restrict the addresses it should use).

Regards
0
 
samcumarAuthor Commented:
Thanks for your help edicom.

I was looking for an answer to this question for a long time.

Many thanks
sam cumar
0

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

Tackle projects and never again get stuck behind a technical roadblock.
Join Now