I am an Apache newbie. I have been using IIS for many years and have
only been using Apache on my hosted sites.
I now am using Apache on my home machine, which is slowly switching
from Windows NT 5 to Linux.
Under NT, I had IIS 4 running. All my web projects were under my
x:\projects folder, with various sub folders for each. For example,the
index.php file for my site <a style='text-decoration: underline;' href="http://www.perfectreign.com" target="_blank">www.perfectreign.com</a> website is on my
home (and work) machines as F:\projects\pr_v3\website\index.php
Under IIS to setup a new site on my machine, I'd just click on the
config tool, to to the "Default Web Site", right-click, click on New
-> Virtual Directory, give the directory an alias and a path, set the
default document and I'm set. On my work machine, for example, my
perfectreign website is http:\\MyWorkComputer\pr3.
At home, since I'm dual-booting for the moment, I've setup the
projects folder under the NTFS volume as \mnt\drvf\projects.
I've read the Apache documentation and the tutorial at:
<a style='text-decoration: underline;' href="http://www.serverwatch.com/tutorials/article.php/1127571" target="_blank">http://www.serverwatch.com/tutorials/article.php/1127571</a>
What I'm wondering is, what do I need to setup to allow the same
behavior to happen at my home machine. I currently have the
development perfectreign at home running at http:\\lilly\pr It is
physically located at f:\projets\pr_v3\website, which would be
/mnt/drvf/projects/pr_v3/website in Linux.
Do I set this up as a Name-Based Virtual Host? If so would my conf
file look like:
<VirtualHost pr>
DocumentRoot /mnt/drvf/projects/pr_v3/website
ServerName lilly
</VirtualHost>
and then for my FileSite development, which is at
/mnt/projects/fsv2/website and should be accessed by typing in
<a style='text-decoration: underline;' href="http://lilly/fsv2," target="_blank">http://lilly/fsv2,</a> I would add:
<VirtualHost fsv2>
DocumentRoot /mnt/drvf/projects/fsv2/website
ServerName lilly
</VirtualHost>
-OR-
Would I use IP based resolution? Since I only have one static IP (I
am on DSL and behind a NAT router.) I would want to point all sites
to the same IP?
<VirtualHost 192.168.1.1>
ServerName lilly
DocumentRoot /mnt/drvf/projects/pr_v3/website
ServerAlias pr
</VirtualHost>
<VirtualHost 192.168.1.1>
ServerName lilly
DocumentRoot /mnt/drvf/projects/fsv2/website
ServerAlias fsv2
</VirtualHost>
Thanks in advance!!
K<!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: Confused about virtual hosts and namve vs IP hosting