GIDForums  

Go Back   GIDForums > Web Hosting Forums > Apache Web Server 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 14-Jan-2004, 15:13
gardolas's Avatar
gardolas gardolas is offline
Awaiting Email Confirmation
 
Join Date: Jan 2004
Location: Devon
Posts: 11
gardolas is on a distinguished road

Help running Apache2 on windows XP


I've got Apache2 running as a service on windows XP, the only problem is that when I try and access localhost IE comes up with the page not found error.

Any help would be greatly appreciated!

Cheers
  #2  
Old 14-Jan-2004, 15:57
garymayor garymayor is offline
New Member
 
Join Date: Jan 2004
Posts: 3
garymayor is on a distinguished road
Ya get linux instead all your problems forever more will be sorted windows has almost had it's time
  #3  
Old 15-Jan-2004, 03:42
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
Hello gardolas,

Search your filesystem for a file named HOSTS, look inside it to see that it has this inside it:
Code:
127.0.0.1 localhost

If you can find the file and it has that line it already, then you must check the apache error logs. That will usually tell you where and what is the problem.

It may be also that your HOSTS file has been 'disabled', i.e. it is renamed to HOSTS.SAM or something like that. If that's it, you can just rename it back.

Quote:
Originally Posted by garymayor
Ya get linux instead all your problems forever more will be sorted windows has almost had it's time
Hi garymayor, I appreciate your reply to this thread but comments like these are completely unnecessary here.
  #4  
Old 16-Jan-2004, 13:17
jnorris jnorris is offline
New Member
 
Join Date: Nov 2003
Posts: 8
jnorris is on a distinguished road
First of all, that file hosts is actually called hosts.sam (short for sample). In order for Apache to run it seems to need that file renamed as just hosts (with no extension). As I use Apache on my own machine to test web sites locally, and learn sql etc I have to rename it with a batch file when I want to play, then rename it back to hosts.sam when I go on the internet (otherwise it tries to find my sites on my machine instead of going out to the internet to find the live version). Secondly I still cant get IE to find anything at all (like you) but Opera works perfectly. I love MSoft cos they have made my life easy, but Opera works fine in this instance and IE doesn't.

Quote:
Originally Posted by JdS
Hello gardolas,

Search your filesystem for a file named HOSTS, look inside it to see that it has this inside it:
Code:
127.0.0.1 localhost

If you can find the file and it has that line it already, then you must check the apache error logs. That will usually tell you where and what is the problem.

It may be also that your HOSTS file has been 'disabled', i.e. it is renamed to HOSTS.SAM or something like that. If that's it, you can just rename it back.


Hi garymayor, I appreciate your reply to this thread but comments like these are completely unnecessary here.
  #5  
Old 16-Jan-2004, 15:23
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
I hope you were not trying to tell me this... because I only wrote the article more than 3 years ago GOD! Has it been that long???
  #6  
Old 17-Jan-2004, 09:09
jnorris jnorris is offline
New Member
 
Join Date: Nov 2003
Posts: 8
jnorris is on a distinguished road

Subservient one pleads and queries further


Of course not, Oh Senior Member! It took me absolutely ages to understand simple nuances in those supposedly clear instructions they give you. I reckonned it might help if I was absolutely specific - to the ORIGINAL guy who asked!

I asked on this forum and others for help running Apache under XP and nobody had any answers to the problems til I worked them out for myself. For instance: Virtual hosts ask for the domian name as does the hosts file. It never occurred to me for ages that in fact you have to specify http://www.domain.com AS WELL AS domain.com in hosts. I thought a domain name was without the www!

Incidentally (running all this locally to test sites out) - I open a Command Window, navigate and run Apache (which runs in the foreground so I get no further prompts) I then open another DOS window to run mySQL server - which does the same, then I open another window to run msql client - how do I write a batch file to do all 3 things autonatically? As I've written it, it opens a window, runs Apache and then sits there not going on to the second line of the batch file to start mysql server. Cheers!

Quote:
Originally Posted by JdS
I hope you were not trying to tell me this... because I only wrote http://www.desilva.biz/apache/virtual.html more than 3 years ago GOD! Has it been that long???
  #7  
Old 17-Jan-2004, 09:37
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
Quote:
Originally Posted by jnorris
... For instance: Virtual hosts ask for the domian name as does the hosts file. It never occurred to me for ages that in fact you have to specify www.domain.com AS WELL AS domain.com in hosts. I thought a domain name was without the www!
Yes, that's what I do too... without a DNS, I am afraid this is all we can do... unless someone else around here knows something we don't.

But how do you make this work with your virtual hosts setting in the httpd.conf file? Are you using SERVER ALIAS too?

Quote:
Originally Posted by jnorris
Incidentally (running all this locally to test sites out) - I open a Command Window, navigate and run Apache (which runs in the foreground so I get no further prompts) I then open another DOS window to run mySQL server - which does the same, then I open another window to run msql client - how do I write a batch file to do all 3 things autonatically?

I don't use a batch file, instead I use shortcuts on my Desktop. I have one for each...
  1. To rename the HOSTS file.
  2. 1 x START Apache & 1 x STOP Apache.
  3. 1 x START MySQL & 1 x STOP MySQL.

It's as uncomplicated as that with Windows ME but I suppose it's quite different with Windows XP. This is why I usually don't reply to questions that have to do with WinXP - simply because I wouldn't know what I am talking about...
  #8  
Old 17-Jan-2004, 09:52
jnorris jnorris is offline
New Member
 
Join Date: Nov 2003
Posts: 8
jnorris is on a distinguished road
Quote:
Originally Posted by JdS
Yes, that's what I do too... without a DNS, I am afraid this is all we can do... unless someone else around here knows something we don't.

But how do you make this work with your virtual hosts setting in the httpd.conf file? Are you using SERVER ALIAS too?

Jon] Heres one of my Virtual Host sections:

<VirtualHost *>
ServerName loire-style.com
ServerAlias http://www.loire-style.com
ServerAdmin webmaster@loire-style.com
DocumentRoot "C:/Documents and Settings/Jon/My Documents/webs/loire-style.com"
ErrorLog logs/loire-style.com-error_log
CustomLog logs/loire-style.com-access_log combined
UseCanonicalName off
AddHandler server-parsed .shtml
Options FollowSymLinks +Includes
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
<IfModule mod_ssl.c>
Include conf/ssl.conf
</IfModule>
</VirtualHost>

Jon] By far the best description of getting Apache to work that actually takes care to explain when something can be read two ways (as so often is the case!) is minitutorials.serveftp.net. He has updated it with my extra comments too, I believe. I just upgraded from Me to XP and it's fine.

I don't use a batch file, instead I use shortcuts on my Desktop. I have one for each...
  1. To rename the HOSTS file.
  2. 1 x START Apache & 1 x STOP Apache.
  3. 1 x START MySQL & 1 x STOP MySQL.

Jon] There has to be a way to get a batch file to do 3 things one after the other!! Anybody else out there?
Please send the batch file to show me how you get it to start AND then stop when you want it o...surely that's 6 batch files in all!!??

It's as uncomplicated as that with Windows ME but I suppose it's quite different with Windows XP. This is why I usually don't reply to questions that have to do with WinXP - simply because I wouldn't know what I am talking about...

Jon] It really is very very little different. I even run things in Consoles because I dont want everything starting up when I start the machine, and XP's miracle (??) is that it runs services (which I dont want) and doesn't need Consoles.
  #9  
Old 19-Jan-2004, 03:13
gardolas's Avatar
gardolas gardolas is offline
Awaiting Email Confirmation
 
Join Date: Jan 2004
Location: Devon
Posts: 11
gardolas is on a distinguished road
The HOSTS file is all present and correct which is weird, yet still no response!

I have got everything working using Apache Friends xampp though so whatever that does seems to have done the trick!

Darn windows XP, windows 9X/Me vastly superior (I've got apahe/PHP/MySQL working fine on my Me Laptop!)

Cheers
  #10  
Old 19-Jan-2004, 04:49
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
When you say "Apache Friends xampp" did you mean this: http://www.apachefriends.org/index-en.html?

The reason I ask is because someone else looking to troubleshoot a similar problem such as yours will at least have an alternative solution...
 
 

Recent GIDBlogLast 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
Please i need help in Apache on windows xp leacoco Apache Web Server Forum 33 05-Feb-2008 04:48
problems enablin drives on windows xp pro indian4evah003 Computer Hardware Forum 5 04-Dec-2003 13:40
Apache on Windows XP and passing variables Jos Elkink Apache Web Server Forum 4 21-Nov-2003 02:21
Critics Please- New Computer Specs BobbyDouglas Computer Hardware Forum 4 06-Sep-2003 00:19
Scan your Windows XP for Security Holes JdS Computer Software Forum - Windows 1 03-Feb-2002 12:46

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

All times are GMT -6. The time now is 00:40.


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