GIDForums  

Go Back   GIDForums > Computer Forums > Computer Software Forum - Windows
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 07-Apr-2003, 16:37
pweinb pweinb is offline
Awaiting Email Confirmation
 
Join Date: Apr 2003
Location: Colorado Springs
Posts: 2
pweinb is an unknown quantity at this point
Question

Apache Virtual Hosts I/II


The 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  
Old 07-Apr-2003, 17:52
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
Arrow

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:
-> system32\drivers\etc

If you still do not find it there, try to create the file using NotePad or some such; type the following:
Code:
127.0.0.1 localhost www.example.com www.example.net

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).
  #3  
Old 08-Apr-2003, 09:32
pweinb pweinb is offline
Awaiting Email Confirmation
 
Join Date: Apr 2003
Location: Colorado Springs
Posts: 2
pweinb is an unknown quantity at this point

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  
Old 08-Apr-2003, 15:15
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
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:
DocumentRoot "/Program Files/Apache Group/Apache/htdocs/XYZ_org"
 
 

Recent GIDBlog2nd Week of IA Training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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

All times are GMT -6. The time now is 19:12.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.