Liam Delahunty: Home Tips Web Contact
Recommended laptop
under £500

Think I deserve a present? See my Amazon Wish List

Windows apache virtualhost

This will allow one to set up apache so that you can access a web site stored locally on a windows box in a more convienient manner: http://sitename rather than It's useful to test things and looks neat!

In the httpd.conf file add a line to the bottom such as:

Include "C:/Program Files/Apache Group/Apache/conf/vhosts.conf"

Create and open that file and add lines such as

NameVirtualHost *

<VirtualHost *>
DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs/" ServerName

<VirtualHost *>
DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs/npw/"
ServerName npw

<VirtualHost *>
DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs/liamdelahunty/"
ServerName ld

<VirtualHost *>
DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs/worldwideco/"
ServerName ww

Now find the HOSTS.SAM file, which may be in C:/windows/. Save it in same directory as HOSTS without the extention. Add the corresponding lines: localhost ld npw ww

Now restart apache and you will be able to see all your local websites using or visit one directly using http://ld/ etc.

Share this!  

Apache Pcfg Openfile Unable To Check Htaccess | Apache Windows Virtualhost | Browsers Sizes


  Tips | Home | Search | Contact

Link here: