LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   Apache on FreeBSD (https://www.linuxquestions.org/questions/%2Absd-17/apache-on-freebsd-59368/)

deesto 05-12-2003 08:10 AM

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?

Please help if you can. Thanks.

markus1982 05-12-2003 12:03 PM

Isn't apache.org running Apache 2 on FreeBSD ? It should work really properly ... which version EXACTLY are you trying to install ?

deesto 05-12-2003 12:23 PM

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.

deesto 05-13-2003 08:05 AM

# apachectl -v
Server version: Apache/2.0.43
Server built: May 11 2003 16:33:48

cyberskye 05-14-2003 02:08 PM

Quote:

Alert!: Unable to connect to remote host.
It's not connecting. Are you sure apache is running? Is your firewall up?

Skye

deesto 05-14-2003 02:44 PM

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.

cyberskye 05-15-2003 08:58 AM

I meant on your webserver...

deesto 05-15-2003 09:01 AM

I believe so:
# ps aux | grep httpd
root 35073 0.0 1.6 3424 1960 ?? Ss 2:26PM 0:02.13 /usr/local/sbin/httpd -k start
nobody 35074 0.0 1.5 3440 1936 ?? I 2:26PM 0:00.00 /usr/local/sbin/httpd -k start
nobody 35075 0.0 1.6 3440 1940 ?? I 2:26PM 0:00.00 /usr/local/sbin/httpd -k start
nobody 35076 0.0 1.6 3440 1940 ?? I 2:26PM 0:00.00 /usr/local/sbin/httpd -k start
nobody 35077 0.0 1.6 3440 1940 ?? I 2:26PM 0:00.00 /usr/local/sbin/httpd -k start
nobody 35078 0.0 1.6 3440 1940 ?? I 2:26PM 0:00.00 /usr/local/sbin/httpd -k start

cyberskye 05-15-2003 09:08 AM

Apache is running.

I meant : Do you have a firewall running on your http host?

Also, have you verified that mod_status is being loaded within httpd.conf?

deesto 05-15-2003 09:18 AM

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.

cyberskye 05-15-2003 09:34 AM

You'll find that BSD is a little more paranoid.

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)


Skye

deesto 05-15-2003 09:43 AM

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?

cyberskye 05-15-2003 10:01 AM

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.

deesto 05-15-2003 10:09 AM

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!

cyberskye 05-15-2003 10:23 AM

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.


All times are GMT -5. The time now is 06:44 AM.