|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
On my Win2K laptop, Apache 1.3.x, I keep local copies of a number of website for these offline, or when a client does not have a connection.
These sites are currently all in folders under /htdocs/ /htdocs/oink/ /htdocs/foo/ etc., I want to have each directory ("foo" "oink", etc.,) act as it's own docroot so URL's of "/" take me to the correct root. I've looked at Apache's docs. re. virtual name-based hosting but am confused as (in this case) my machine is not on a newtork, it is all "localhost 127.0.0.1" -stuff What changes do I need make within httpd.conf (and Windows "hosts" file?) to enable this? Thank you David |
|
#2
|
|||
|
|||
|
I do the following to allow access to /htdocs/generator :
In the Win2k hosts file i include a entry : 127.0.0.1 generator.domain.com In the httpd.conf in include : NameVirtualHost 127.0.0.1 and just below : <VirtualHost 127.0.0.1> ServerName generator.domain.com DocumentRoot "d:/Apache/htdocs/generator" ErrorLog logs/generator-error_log CustomLog logs/generator-access_log common </VirtualHost> I restart Apache and can now access what previously was localhost/generator as generator.domain.com Hope it helps, morten sorensen |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > Virtual hosting on Windoze |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|