Virtual Domains - Basics
(Page 2 of 4 )
Before we start Always, Always, ALWAYS!! make a backup before you start.
cd to the correct directory
then
This copies the httpd.conf file to a backup file of httpd.orig this way if you have a real problem or you really mess up you can always revert back to the original one.
Using your favorite text editor I use vi or if your new to Linux pico is very easy to use.
or
open the file httpd.conf Near the bottom you will see notations where the virtual domains should be placed.
This is an example of the most basic virtual
<VirtualHost 111.111.111.111> ServerName www.yoursite.com DocumentRoot /var/www/sites/yoursite </VirtualHost> |
This is small and it works...
Every virtual host like HTML has to have an opening <VirtualHost ip address> and a closing </VirtualHost>
The first line needs two things the opening <VirtualHost and your IP address>.
The second line denotes your site name
The third line is the path to your documents. I always use the above path /var/www/sites this keeps things organized but you can put them anywhere in theory but try my way for a while.
Closing </VirtualHost>
Now that's a real basic working virtual host.
Next: Additional Items >>
More Miscellaneous Articles
More By Codewalkers