![]() |
|
#1
|
|||
|
|||
Apache Virtual Hosts I/IIThe issue you address in these 2 tutorials is exactly what I need to do. (I found them to be very well written!) Unfortunately, there is a hitch. I can't find either a HOSTS or a HOSTS.SAM file--anywhere. (I have done a full search on my hard drive starting at the root and including sub-folders for hosts.* yielding "no files found". I have "display hidden files" checked also.) I am running Apache HTTP Server 1.3 on Windows 2000 Pro. Do you have any insight?
![]() |
|
#2
|
||||
|
||||
Where is the HOSTS / HOSTS.SAM file in Windows 2000?Hello pweinb,
I am not certain where this file might be on your system since I have not much experience with Windows NT / 2000 / XP. What I have read on the Net so far is that it should be at: Code:
If you still do not find it there, try to create the file using NotePad or some such; type the following: Code:
Save the file as HOSTS and save it to the location mentioned above where the 2 example domains are your 'local' sites being developed. Please let me know if it worked, ok? n.b. If this works, you must remember to rename the file to HOSTS.SAM before you get online and try to visit the LIVE sites i.e example.com and example.net (that are contained in this HOSTS file). __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#3
|
|||
|
|||
Where is the HOSTS / HOSTS.SAM file in Windows 2000?The HOSTS file for Windows 2000 is, as you stated, located at
C:\WINNT\System32\drivers\etc The other difficulty I encountered was properly stating the DocumentRoot path in the httpd.conf file. In my case the path to my web docs is: C:\Program Files\Apache Group\Apache\htdocs\XYZ_org\ So the line in my VirtualHosts section of the httpd.conf file is: DocumentRoot "/Program Files/Apache Group/htdocs/XYZ-org" or DocumentRoot "C:/Program Files/Apache Group/htdocs/XYZ-org" The forward slashes are required because Apache comes from the Unix world. The quoatations are only required because of the "illegal" space characters in the path. Without the spaces, the " " are not needed. The best troubleshooting tool I found to figure this out was by using the Apache Test Configuration tool. This is found at: Start->Apache HTTP Server->Configure Apache Server->Test Configuration This will launch a command prompt window telling you whether apache is "happy" with its current configuration. For the path problem above, it told me the path was not found until I fixed my path statement. Anyway, I'm running my www.XYZ.org "locally" now for testing purposes! ![]() |
|
#4
|
||||
|
||||
|
You seem to have missed this little typo:
XYZ_org != XYZ-org and you seem to have also missed the Apache/htdocs/ bit in your path. The line in httpd.conf should look like this after you make the changes: Code:
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
Recent GIDBlog
2nd Week of IA Training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| apache php no longer working (MX??) XP?? | ChicoMendez | Apache Web Server Forum | 5 | 30-Aug-2004 10:51 |
| connect tomcat to apache | kefen | Apache Web Server Forum | 0 | 11-Dec-2003 22:13 |
| Logging for virtual hosts | 88guy | Apache Web Server Forum | 1 | 30-Nov-2003 02:18 |
| Apache multiple localhosting - desperate! | jnorris | Apache Web Server Forum | 8 | 23-Nov-2003 23:55 |
| Apache Virtual Hosts Local Machine Help | seanmayhew | Web Design Forum | 2 | 24-Jul-2002 06:32 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The