*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448
Rep:
Apache on FreeBSD
My question is in regard to getting Apache up and running on FreeBSD 5. I was previously running Slackware 8.1 and was prompted to change my OS because an IRCd that I was running for a friend (viagra) kept failing and splitting, and the IRCd is apparently native to BSD. So I have a moderate knowledge of Linux and Slackware, but I'm brand new to BSD.
I installed the 'ports' version of Apache2, which is now running on my machine, but not working properly. I poked around all the documentation I could find regarding FBSD and Apache, and followed it the best I could. But the server is not accessible, and I keep getting the following error when I check the daemon's status:
# apachectl status
Looking up localhost
localhost
Making HTTP connection to localhost
Alert!: Unable to connect to remote host.
lynx: Can't access startfile http://localhost/server-status
I'm assuming this means that not only is my host inaccessible, but some startup/status file is missing as well?
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448
Original Poster
Rep:
I installed the port version of 'apache2' included on the FreeBSD 5.0 installation disc, which I assume from checking the list of current ports on freebsd.org is apache-2.0.45.
I am sure many, many users are currently enjoying their successfully installed and configured apache servers on their BSD machines, and that something I have (mis)configured is causing the problem, but being new to BSD and never having tried to run apache on BSD before, let alone apache 2 on any platform. I just have no idea what the trouble is.
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448
Original Poster
Rep:
Yes: the daemon is definitely running, and I do have a firewall built into my Linksys router, but even if I hadn't 'poked a hole' in the firewall for traffic to get through that port, it wouldn't affect access from the same machine to itself within my local network.
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448
Original Poster
Rep:
I got so fed up that nothing was working yesterday that I decided to start the configuration from scratch. I copied "highperformance-std.conf" (which is supposed to be a low maintenance, high performance configuration) to "httpd.conf" and made the very few modifications needed, or so I thought. But nothing has changed as far as the server's functionality. highperformance-std.conf does not contain a specification for mod_status.
I've not knowingly activated any firewall on the FreeBSD machine, but I'm learning that my knowledge of BSD, in comparison even to Linux, is close to nill and I may have triggered something of which I'm unaware.
Just checked my httpd.conf to make sure I'm not loosing it - you do need a LoadModule statement for mod_status.so
Why don't you try putting a simple html file in document root to test? Assuming it servers the page, you can start looking at which modules you would like to enable.
mod_status can represent a security hole. It's best to set it so that it may only be accesses by local machines (ie 192.168.1.x - or whatever your LAN addressing scheme requires)
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448
Original Poster
Rep:
Hmmm... that was such a simple idea that I had totally overlooked it... thank you! Well I created a new file /usr/local/etc/www/index.html and tested it ("lynx http://localhost:643/index.html") and it worked... almost! It showed the raw HTML code I had created as a test, but maybe that's what lynx does?
No lynx here, but I don't believe you should see any tags. Methinks something's whacky in your httpd.conf if it's not parsing the file.
At least your server is up and permissions are ok. I'll post back if anything else comes to mind, but I'm a little stumped at this point without running through your httpd.conf.
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448
Original Poster
Rep:
I am more than sure something is wacky! I'd be glad to post my conf file, but LQ doesn't offer the option for uploading files, and I don't want to flood the thread with text. I'm more than willing to start from scratch again, so if you have a good conf file or can suggest one, please let m eknow!
PM me your email addy. I have a base conf (php, too) - just search and replace every instance of CHANGEME and, unfortunately, the path for all your modules, etc. Maybe diffing my file and yours will shed some light.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.