Select Page
Notifications
Clear all

How to Set Up Virtual Hosting on Apache

(@Anonymous)
New Member

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.)

Quote
Topic starter Posted : 03/06/2010 9:17 am
Share: