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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-19-2003, 09:15 AM
|
#1
|
Member
Registered: Nov 2002
Posts: 70
Rep:
|
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.
|
|
|
02-19-2003, 09:43 AM
|
#2
|
Member
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420
Rep:
|
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
|
|
|
02-19-2003, 09:50 AM
|
#3
|
Member
Registered: Nov 2002
Posts: 70
Original Poster
Rep:
|
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).
|
|
|
02-19-2003, 02:40 PM
|
#4
|
Member
Registered: Oct 2002
Location: Northern Ontario, Canada
Distribution: Slackware 10.0
Posts: 789
Rep:
|
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.
|
|
|
02-19-2003, 03:14 PM
|
#5
|
Member
Registered: Jan 2003
Location: Sydney, Australia
Distribution: FedoraCore
Posts: 105
Rep:
|
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! 
|
|
|
02-19-2003, 04:07 PM
|
#6
|
Member
Registered: Nov 2002
Posts: 70
Original Poster
Rep:
|
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 
|
|
|
02-20-2003, 02:30 AM
|
#7
|
Member
Registered: Jan 2003
Location: Sydney, Australia
Distribution: FedoraCore
Posts: 105
Rep:
|
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?
|
|
|
02-20-2003, 04:10 AM
|
#8
|
Member
Registered: Nov 2002
Posts: 70
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 03:00 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|