How to Set Up Virtual Hosting on Apache

Share topics related to IT, Computer & Technology happening around the world. Hardware and Software and Firmware come here
Post Reply
robinhood12
Posts: 17
Joined: Thu Aug 26, 2010 9:46 pm
Location: Uik
Contact:

How to Set Up Virtual Hosting on Apache

Post by robinhood12 »

How to Set Up Virtual Hosting on Apache

If you are running an Apache Web server on a DSL or faster link, you can become a hosting provider for other people. You can even host their domains, without needing an IP for each domain. This is called virtual hosting, and you'd be surprised at how easy it is. Remember, some access providers have rules against running hosting services, check your hosting agreement for more information.

Register a Domain
The first thing that needs to happen is you need to register a domain at Internic or
Register.com. Follow the instructions at these sites (links on the right), to register your
new domain. If you're creating this for a customer, you can have them register the domain or you can do it yourself.

Domain Name Service
This is the hardest part. If you don't host your own DNS, you'll need to contact your
hosting provider to have the new domain added to the DNS server. If you're hosting your own DNS this consists of:

1. edit Bind or NameD or DNS to add the new domain name
2. point it to the IP of your virtual hosting server
3. restart your DNS service

Apache Configuration
Once you have the DNS pointing to your virtual domain server, you need to tell your Web server where to find the Web files for the domain. The way Apache works, if you have set up virtual domains, the first domain entered is the default. This is the directory that will be displayed when a virtual domain is not listed in the configuration. (In other words, if the DNS entry made above sends the URL to your IP, but you don't have the virtual host in your httpd.conf file.)

Thanks
Post Reply