Trial setup of virtual hosts. (One web server with many sites)

Picture of Trial setup of virtual hosts. (One web server with many sites)
Screenshot-Mozilla Firefox-2.png
Some notes I took to get virtual hosting to work with Apache 2.x on Ubuntu 10.04. I will probably go back and clean it up later. Not saying this is the right way to do it, but it is what was done. I may also have missed a step or two. Oh well for the middle of the night, who knows what I did. In any case this is for private networks only. WARNING: IT IS NOT SECURE (i.e Do not use on a live server to the internet and if you do, do it at your own risk).

One nice thing about this project is that for home everyone can have not only their own web site, they can have several of them.

Note: This project assumes you already have all the Apache modules you need. If you run into a problem please get expert help if you are unsure as to what to do.
Remove these adsRemove these ads by Signing Up

Step 1: DNS.

Picture of DNS.
Mod hosts files for host and dns, but use actual server ip. You will need to talk to the dns admin about modifying the dns server.

$ sudo nano /etc/hosts

[code]       localhost oesrvr1       oesrvr1    oesrvr1    oesrvr3    printer1    printer2    nas

# The following lines are desirable for IPv6 capable hosts

Step 2: Enable virtual hosts.

Picture of Enable virtual hosts.
Create a virtual.conf in /etc/apache2/conf.d

$ sudo nano /etc/apache2/conf.d/virtual.conf

# enable multiple virtual hosts
NameVirtualHost *
ScottyAura3 years ago
okay i think people waist thier time doing it like this but then again i use the webserver online.....sometime soon I will post a tut about how to do this an easier way that works better and is completely free that will actually host multiple sites online using only one machine
Computothought (author)  ScottyAura3 years ago
Figured out what my problem was and why it was not working. The redo page should outline the correct way.