tags:

views:

767

answers:

1

Hi,

I have a WEB server with static IP installed with Windows with XAMPP apache. I create a directory WEBPROG in D drive where it is all my websites program. I purchase a domain name and point to my WEB server IP. But I would like to point directly to the D:\WEBPROG and when I enter www.mywebsite.com it will not show the website. I have to enter www.mywebsite.com/WEBPROG then it will appear. I try the virtualhost configuration but It seem not working. Can someone advise on this though I have searched many websites for try their recommendation but it does not work.

Thanks

Gad

A: 

This is an exempt from the httpd-vhosts.conf in XAMPP (apache/conf/extra):

NameVirtualHost *:80

<VirtualHost *:80>
    DocumentRoot /www/docs/dummy-host.example.com
    ServerName dummy-host.example.com
    ServerAlias www.dummy-host.example.com
    ErrorLog @rel_logfiledir@/dummy-host.example.com-error_log
    CustomLog @rel_logfiledir@/dummy-host.example.com-access_log common
</VirtualHost>

Use this configuration as a template, and make sure you specify DocumentRoot to d:/webprog. Note that the NameVirtualHost is what you need to make domain names work with the VirtualHost directive.

ciscoheat