LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 02-19-2003, 09:15 AM   #1
cuboctahedron
Member
 
Registered: Nov 2002
Posts: 70

Rep: Reputation: 15
Error reading WWW server response (HTTP Header)??


Hi ,
I am trying to set up an apache server.
However when I type http://localhost/test.php I get an error mesage "Error reading WWW server response (HTTP Header)".
test.php only has the simple code:
<?php
echo "hallo world";
?>
Apache server is running.
Anyone a clue; I am using redhat8

kind regards
Patrick
PS html files will not work neither.
 
Old 02-19-2003, 09:43 AM   #2
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Rep: Reputation: 30
I don't know PHP, so I have no idea whether or not that's valid. However, I can offer up simple troubleshooting logic for you. Have you tried a basic HTML file instead? Or is it only PHP that's not working? Tried getting it from another client machine/browser?

-Gauge
 
Old 02-19-2003, 09:50 AM   #3
cuboctahedron
Member
 
Registered: Nov 2002
Posts: 70

Original Poster
Rep: Reputation: 15
Yes, I tried regular HTML, or textfiles also but not successfull;

I can read normal webpages on the internet, just except for my localhost(127.0.0.1).
 
Old 02-19-2003, 02:40 PM   #4
Texicle
Member
 
Registered: Oct 2002
Location: Northern Ontario, Canada
Distribution: Slackware 10.0
Posts: 789

Rep: Reputation: 30
Instead of http://localhost/test.php did you try http://127.0.0.1/test.php? I know it sounds basic, but sometimes we overlook the small stuff. If using the exact local IP works, then it could be a problem with the domain name of localhost. Have you changed the hostname of your box? Mine is now frankenstein so if I use "localhost" it might not find it whereas it might find "frankenstein". I don't have apache running and haven't tried this, but sometimes name associations with IPs can get muddled. Try it with the IP first and then if it works, try it with your hostname instead of localhost (if you've changed it).

[root@frankenstein]# hostname
frankenstein

Typing "hostname" at a prompt should give you your box's correct hostname to use in your URL test.
 
Old 02-19-2003, 03:14 PM   #5
lhiggins
Member
 
Registered: Jan 2003
Location: Sydney, Australia
Distribution: FedoraCore
Posts: 105

Rep: Reputation: 15
Just some more basic questions. Is the test.php file in the /var/www/html/ directory? Are you connecting to the right port? This has got me before. If you changed the default port from 80. You will need to specify it in the url. (e.g. http://127.0.0.1:85). This little overlooked problem has made me bang my head on the wall a few times. What does your httpd.conf file say. If you need to find it. It is usually located in the /etc/httpd/conf/ directory. Remember if you make changes to this file you will need to restart or graceful apache. ('apachectl restart' or 'apachectl graceful' as root.

Oh are you actually seeing plain html? If you arent you may be blocked from your firewall. Check your httpd.conf file and .htaccess (which is located in your www directories as a hidden folder - you will see it with 'ls -la'). You may need to allow php.

Hope I helped!
 
Old 02-19-2003, 04:07 PM   #6
cuboctahedron
Member
 
Registered: Nov 2002
Posts: 70

Original Poster
Rep: Reputation: 15
Hi,
I tried 127.0.0.1, but no results. Also I havent change my computername nor portnr.

It's baffling me, since it worked, before I installed the flash6 plugin for Mozilla. I wouldt know how it could affect it.

Can a firewall prevent access from a localhost also?

Any help or suggestions are very appreciated
 
Old 02-20-2003, 02:30 AM   #7
lhiggins
Member
 
Registered: Jan 2003
Location: Sydney, Australia
Distribution: FedoraCore
Posts: 105

Rep: Reputation: 15
I am pretty sure a firewall can prevent localhost. Maybe one of the more advanced Linux users may be able to answer that.
Whats in your httpd.conf files?
 
Old 02-20-2003, 04:10 AM   #8
cuboctahedron
Member
 
Registered: Nov 2002
Posts: 70

Original Poster
Rep: Reputation: 15
I didnt change anything in the httpd.conf +itīs still in default. I wanted to make the webserver run firstly, before I would modify it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Modify Header Response Vort3x Linux - Security 8 12-17-2004 12:58 PM
Help, no ftp or http response. fredfarnes Linux - Networking 4 11-14-2004 03:53 PM
Error 2: reading header: cpio: Bad magic sujitshah Linux - Software 1 03-20-2004 10:37 AM
Error 2 Reading Header: Cpio: Bad Magic rakoo Red Hat 2 03-12-2004 03:29 PM
Error 2 Reading Header: Cpio: Bad Magic rakoo Red Hat 0 03-10-2004 05:31 PM


All times are GMT -5. The time now is 08:15 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration