Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
The solution probably has been posted but I cannot find
it. I would like to setup a web server using Apache. I
have a domain registered and I want to host it and host
several virtual domains. Anyone know where I can find
some step by step instructions on both issues? (using
apache to host my website, and setup virtual domains)Thanks
KBB

The best place to start is Apache.org but the manual can be a little deep. Go on over to http://www.apachefreaks.com and go to their forum. For now I will give you a simple tutorial that should get you up and running.
First and foremost you must have your domain name pointed at your IP address. You can do this by either doing it from the company that you registered with or setting up your own domain name server. If you have never messed with DNS before do it through your registrar and save the hassle. This also assumes that you have a static IP address. The other assumption I am making is that you are using Linux to run the webserver. If you are not do yourself a favor and switch to Linux otherwise sign-up with a webhost that offers a decent reseller program for your vhosting. Now on to the tutorial.
Open up your favorite text editor and go to /etc/httpd/conf/httpd.conf. This is your Apache configuration file and it will control what goes on with Apache. Find the following line:
ServerName <your static IP address:80>
Ex.
ServerName 63.239.89.174:80You will notice the file has a ton of notes that direct what to configure and such. As you learn more about Apache you can tweak the file to your liking. For now we will do a basic setup.
Move to the following line and make sure it looks like this:
Listening 80
and
ServerAdmin you@youremail.com #obviously you need to put your email address in here.Now to the Virtual Hosting section which is located at the bottom of the file.
NameVirtualHost *:80
<VirtualHost *:80>
ServerName yourdomain.com
ServerAlias www.yourdomain.com
ServerAdmin you@yourdomain.com
DocumentRoot /var/www/html
</VirtualHost><VirtualHost *:80>
ServerName anotherdomain.com
ServerAlias www.anotherdomain.com
ServerAdmin somebody@anotherdomain.com
DocumentRoot /var/www/html/anotherdomain
</VirtualHost>You can add as many as you want but I will stop here.
If you do not have a static IP don't worry. Services like no-ip.com and dyn-dns.com cater to folks like you. If all else fails email me.
~Chris
http://www.comsyst.net

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |