Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache Problems on XP

Status
Not open for further replies.

NormRumac

Programmer
Sep 4, 2003
41
CA
Hi. I am having troubles getting Apache to work on WinXp.

The installation seemed to go o.k. I specified my computer's intranet address 192.168.1.101 as servername and domain name. Apache didnt complain, and it is running as a bacground service. However, I cannot access the Apache Welcome page when I type " or even " for that matter) on the url bar of my browser.

Morevoer, doing a netstat -a shows me that no IP address is listed as listening on PORT 80 (other than address 0.0.0.0).

I am at my wits end here. Any ideas?

Thanks,
 
Use a name for your server ie. localhost and see if you can access it that way.

Check your port directive and ensure that it is 80 and uncommented and if you are using a virtual host directive ensure that it looks something like the following:
<VirtualHost *>
ServerName server.com
DocumentRoot d:/home/server/public_html
ServerAlias server.com ServerAdmin webmaster@server.com
<Directory d:/home/server/public_html>
Options FollowSymLinks Indexes IncludesNOEXEC
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

Additionally check that the following entry is commented so that your server will listen on any address.

# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# directive.
#
#Listen 3000
#Listen 12.34.56.78:80
 
I did try servername=localhost. No luck there..
Port directive is 80.
I am not using the virutal host directive.

I tried restarting the Apache service, but still I cant get to the welcome screen. Apache is definitely running as a background process according to WinXp. To add to the frustration, no log files are produced in error.log

If it helps, here is my httpd.conf:


ServerType standalone
ServerRoot &quot;C:/Program Files/Apache Group/Apache&quot;
PidFile logs/httpd.pid
ScoreBoardFile logs/apache_runtime_status
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MaxRequestsPerChild 0
ThreadsPerChild 50
BindAddress *
ClearModuleList
AddModule mod_env.c
AddModule mod_log_config.c
AddModule mod_mime.c
AddModule mod_negotiation.c
AddModule mod_include.c
AddModule mod_autoindex.c
AddModule mod_dir.c
AddModule mod_isapi.c
AddModule mod_cgi.c
AddModule mod_asis.c
AddModule mod_imap.c
AddModule mod_actions.c
AddModule mod_userdir.c
AddModule mod_alias.c
AddModule mod_access.c
AddModule mod_auth.c
AddModule mod_so.c
AddModule mod_setenvif.c
Port 80
ServerAdmin ***@***.com
ServerName localhost
DocumentRoot &quot;C:/Program Files/Apache Group/Apache/htdocs&quot;
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory &quot;C:/Program Files/Apache Group/Apache/htdocs&quot;>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<IfModule mod_userdir.c>
UserDir &quot;C:/Program Files/Apache Group/Apache/users/&quot;
</IfModule>
<IfModule mod_dir.c>
DirectoryIndex index.html
</IfModule>
AccessFileName .htaccess
htaccess files. If you change the AccessFileName directive above,
<Files ~ &quot;^\.ht&quot;>
Order allow,deny
Deny from all
Satisfy All
</Files>
UseCanonicalName On
<IfModule mod_mime.c>
TypesConfig conf/mime.types
</IfModule>
DefaultType text/plain
<IfModule mod_mime_magic.c>
MIMEMagicFile conf/magic
</IfModule>
HostnameLookups Off
ErrorLog logs/error.log
LogLevel warn
LogFormat &quot;%h %l %u %t \&quot;%r\&quot; %>s %b \&quot;%{Referer}i\&quot; \&quot;%{User-Agent}i\&quot;&quot; combined
LogFormat &quot;%h %l %u %t \&quot;%r\&quot; %>s %b&quot; common
LogFormat &quot;%{Referer}i -> %U&quot; referer
LogFormat &quot;%{User-agent}i&quot; agent
CustomLog logs/access.log common
ServerSignature On

<IfModule mod_alias.c>







Alias /icons/ &quot;C:/Program Files/Apache Group/Apache/icons/&quot;
<Directory &quot;C:/Program Files/Apache Group/Apache/icons&quot;>
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>




Alias /manual/ &quot;C:/Program Files/Apache Group/Apache/htdocs/manual/&quot;
<Directory &quot;C:/Program Files/Apache Group/Apache/htdocs/manual&quot;>
Options Indexes FollowSymlinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>








ScriptAlias /cgi-bin/ &quot;C:/Program Files/Apache Group/Apache/cgi-bin/&quot;




<Directory &quot;C:/Program Files/Apache Group/Apache/cgi-bin&quot;>
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
</IfModule>
<IfModule mod_autoindex.c>








IndexOptions FancyIndexing





AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core
AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^




DefaultIcon /icons/unknown.gif





















ReadmeName README
HeaderName HEADER




IndexIgnore .??* *~ *
</IfModule>
<IfModule mod_mime.c>






AddEncoding x-compress Z
AddEncoding x-gzip gz tgz



























AddLanguage da .dk
AddLanguage nl .nl
AddLanguage en .en
AddLanguage et .ee
AddLanguage fr .fr
AddLanguage de .de
AddLanguage el .el
AddLanguage he .he
AddCharset ISO-8859-8 .iso8859-8
AddLanguage it .it
AddLanguage ja .ja
AddCharset ISO-2022-JP .jis
AddLanguage kr .kr
AddCharset ISO-2022-KR .iso-kr
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddCharset ISO-8859-2 .iso-pl
AddLanguage pt .pt
AddLanguage pt-br .pt-br
AddLanguage ltz .lu
AddLanguage ca .ca
AddLanguage es .es
AddLanguage sv .sv
AddLanguage cz .cz
AddLanguage ru .ru
AddLanguage tw .tw
AddLanguage zh-tw .tw
AddCharset Big5 .Big5 .big5
AddCharset WINDOWS-1251 .cp-1251
AddCharset CP866 .cp866
AddCharset ISO-8859-5 .iso-ru
AddCharset KOI8-R .koi8-r
AddCharset UCS-2 .ucs2
AddCharset UCS-4 .ucs4
AddCharset UTF-8 .utf8






<IfModule mod_negotiation.c>
LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw
</IfModule>




AddType application/x-tar .tgz





























</IfModule>
<IfModule mod_setenvif.c>








BrowserMatch &quot;Mozilla/2&quot; nokeepalive
BrowserMatch &quot;MSIE 4\.0b2;&quot; nokeepalive downgrade-1.0 force-response-1.0





BrowserMatch &quot;RealPlayer 4\.0&quot; force-response-1.0
BrowserMatch &quot;Java/1\.0&quot; force-response-1.0
BrowserMatch &quot;JDK/1\.0&quot; force-response-1.0
</IfModule>










 
Also, I mentioned earlier that running netstat -an shows me a process listening at 0.0.0.0:80

That seems peculiar to me, because it seems to tell me that something is listening on port 80. However, if I type &quot; I dont get to the welcome page either. Maybe thats because the address 0.0.0.0 is special, and is getting filtered before the packets have a chance to even get to the Apache daemon.
 
try commenting out bind address and enter
Listen 192.168.1.XXX:80 (XXX being your network ip).

Do you have a XP's firewall running? Try pinging port 80. And try to reboot the computer after you make changes.

What software package are you using?
 
I changed the listen address to 192.168.1.101 ,ran netstat -an .........and VOILA, there was now a background daemon listening on that IP at port 80. I am sure this was in my original httpd.conf, before I started playing with it, so I was puzzled why I originally couldnt see the test page from my browser.

And guess what? I *still* could not see the test page after typing in on my browser's URL bar! At this point, I should mention that I was using Internet Explorer 6.0.26

As a last measure, I tried accessing using the Opera Browser....and to my surprise....IT FINALLY WORKED! I could see the Apache test page with no difficulty.

All those hours of blood, sweat and tears because of what I am guessing is some IE problem!!

Thanks for your help. If it wasnt for the guys at this forum, i would have given up hope many hours ago.
 
i had the same prob but all it was in my Case is that XP by default installed messenger (msn) which runs on port 80 I uninstalled messenger and it was fine, could this be ur problem ?

To err is human, to completely mess up takes a computer.
 
I am about to install apache on my laptop (XP) I am a little concerned that all this sounds a bit beyond my ability and a little risky. I have MSN messenger installed and Zonealarm. I am using a book (php in easy steps) it doesnt mention any of these potential problems and I'm glad I've found this site. I may be abit too cautious but better safe than sorry can NE1 ease my mind?
 
It's really not all that bad, many times it works right away without any problems. If you have trouble, the forums help alot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top