Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
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.
Ok, I've got the latest Apache 2.0.45 release from MandrakeSoft installed on this Mandrake 9.1 setup, with the security set to Higher, and a few custom lines in the python file /etc/security/msec/level.local to improve login permissions.
Apache runs, and /etc/init.d/httpd start starts httpd2 with no problems. However, if I then try http://localhost in a browser, or localhost:80, or 127.0.0.1 or any combo, as well as Mdk91hdb5 variations as the hostname is set at boot to that (and there are entries in /etc/hosts for both hostnames) I get nothing.
Normally I get an unknown host message.
When I try this while online I get a timeout error and a mention of the port 80.
Guarddog is set to enable local and internet access to port 80, 81 and 53.
The only sign it's recieving requests or anything from anywhere is a dodgy single entry in /var/log/httpd/access_log:
81.131.151.57 - - [06/Jun/2003:23:07:15 +0100] "GET /default.ida?XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX%u9090%u6858%ucbd3%u7801%u9090%u6858%ucbd3%u7801%u9090%u6858%ucb d3%u7801%u9090%u9090%u8190%u00c3%u0003%u8b00%u531b%u53ff%u0078%u0000%u00=a HTTP/1.0" 404 354 "-" "-"
Yup, a quick check reveals that's an old Code Red request
Why doesnt my webserver work for me?
I uncommented the line Servername localhost in one apache config file, that's it, the rest is default. Any ideas?
I dont think I forced any apache packages when they required more to be downloaded due to dependancies, but I was getting tired and irritated.
Bump. I'll be playing with the install tonight so any hints would be great. I remember apache worked fine out the box with Mdk9.0. But I really want my 9.1 server install working.
This is true for 127.0.0.1, Mdk91hdb5 (the machine's hostname) and any ammendment of :80, 8080, 8008, 8800, 8088, 81, 8181, 443... all give the same error. And with http://www. instead too.
If I then go online without stopping or restarting that apache process, I get
Stopping apache and then starting it while already connected to the internet made no difference to these results.
I start apache as root with /etc/rc.d/init.d/httpd start or something very similar, not with apachectl. -X is not a valid arguement/use. I dont think I even have the apachectl script wrapper thing, I only remember that from installing via source on my old Mdk9.0 install once.
Mdk91hdb5 is "hostname -s", not the "hostname -i" you need, unless you're not connected to the 'net, which you're not. Forget about the "www." prefix, cuz you ain't got the DNS entry. If ServerName equals your public IP address $(hostname -i), then you can browse it by IP address, if it's the FQDN $(hostname -f) and you have got an entry in /etc/hosts from "$(hostname -i) $(hostname -f) <alias>", then you can browse it by IP, FQDN and alias AFAIK.
It seems that you are not getting anly local host connections at all yet the connection times out when you are on the net. Maybe you should check to see if the loopback device has started and that there is a vailid route to the loobback in the routing table.
To start with -X then look at the /etc/rc.d/init.d/httpd script and add -X to the end of the command used in the start subroutine.
I put the comments back in the httpd config file, and restored all other settings to their install defaults. david_ross nailed the problem, I'd turned off the Network service which starts the loopback route interface doodle. With that started, Apache works fine.
Well, the Higher security settings are making the manual pages (and error ones) unreachable, but I'll work on it
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.