GIDForums  

Go Back   GIDForums > Webmaster Forums > Web Design Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 23-Jul-2002, 21:31
seanmayhew seanmayhew is offline
New Member
 
Join Date: Jul 2002
Posts: 1
seanmayhew is an unknown quantity at this point

Apache Virtual Hosts Local Machine Help


Im trying to set up virtual hosts with apache for testing php on my local
machine. I've searched the web all over and found the same instructions
consistantly and have tried them numerous times but have been unsuccessful.


First of all I'm having trouble determining where this "hosts" file is
supposed to be located so I altered it and saved it in the first directory I
found it...

C:\WINNT\system32\drivers\etc

Then made a copy of it to...
C:\WINNT\system32

I changed the line from

127.0.0.1 localhost
-to-
127.0.0.1 localhost examplesean.com

I should mention that the hosts file I'm using does not contain the .sam
extnsion that I found in tutorials the "hosts" file in fact has no file
extension.

I changed the httpd.conf file to contain:
NameVirtualHost 127.0.0.1:80
<VirtualHost 127.0.0.1>
ServerName examplesean.com
ServerAdmin your_email@yourwebserver.com
DocumentRoot "/www/examplesean"
ErrorLog logs/error_log
CustomLog logs/access_log common

i created two directories in my apache htdocs directory one called www (as
is similar to modwest) then a folder called examplesean with an index.html
file.

When I put http://examplesean.com into the browser I get the following
error


Not Found
The requested URL / was not found on this server.


----------------------------------------------------------------------------
----

Apache/1.3.19 Server at examplesean.com Port 80
Im running PHP4 with apache on a Windows 2000 professional OS. Any help
would be greatly appreciated.
  #2  
Old 23-Jul-2002, 22:08
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
u know sean, i wish i knew enough about setting up apache on winnt to actually give u a one sentence solution; but i don't.

i don't know if ur problem is that it (apache) doesn't work at all or u're just having problems setting up a virtual host?

if it's the former, try setting up apache without tweaking the settings and accessing http://localhost with your browser (and of course start apache!) and see what happens... if it works than we can try to figure out the problems with the rest
  #3  
Old 24-Jul-2002, 07:32
nickbeee's Avatar
nickbeee nickbeee is offline
Junior Member
 
Join Date: Aug 2001
Location: Nottingham, UK
Posts: 80
nickbeee is on a distinguished road
Sean,

Quote:
DocumentRoot "/www/examplesean"
Apache will look in "C:\www\examplesean" (leading slash in your path)

Better using the full pathname , eg I use "c:\wwwroot" on all of mine.

hosts.sam is a sample file supplied with winxx for you to edit and save as hosts.

Quote:
Apache/1.3.19 Server at examplesean.com Port 80
Suggest you upgrade to 1.3.26 latest version (security fixes)

Another tip: apache docs should always be viewable at http://127.0.0.1/manual/ no matter where you point documentroot. There is a section here on running it on a windows platform.


I've just recently set up a system in the office on NT4 with apache & php 4.2.1 so when I get back next week I'll copy off my config files if anyone is interested.

Good Luck!
NickBeee
 
 

Recent GIDBlogOnce again, no time for hobbies 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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SE Friendly URLs Apache Bug? JamesRxx555 Web Hosting Forum 18 18-May-2004 05:50
Logging for virtual hosts 88guy Apache Web Server Forum 1 30-Nov-2003 03:18
Apache Virtual Hosts I/II pweinb Computer Software Forum - Windows 3 08-Apr-2003 16:15

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 21:34.


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