LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 05-12-2003, 08:10 AM   #1
deesto
Member
 
Registered: May 2002
Location: NY, USA
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448

Rep: Reputation: 31
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.
 
Old 05-12-2003, 12:03 PM   #2
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
Isn't apache.org running Apache 2 on FreeBSD ? It should work really properly ... which version EXACTLY are you trying to install ?
 
Old 05-12-2003, 12:23 PM   #3
deesto
Member
 
Registered: May 2002
Location: NY, USA
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448

Original Poster
Rep: Reputation: 31
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.
 
Old 05-13-2003, 08:05 AM   #4
deesto
Member
 
Registered: May 2002
Location: NY, USA
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448

Original Poster
Rep: Reputation: 31
# apachectl -v
Server version: Apache/2.0.43
Server built: May 11 2003 16:33:48
 
Old 05-14-2003, 02:08 PM   #5
cyberskye
Member
 
Registered: Feb 2003
Location: The City by the Bay
Posts: 116

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

Skye
 
Old 05-14-2003, 02:44 PM   #6
deesto
Member
 
Registered: May 2002
Location: NY, USA
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448

Original Poster
Rep: Reputation: 31
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.
 
Old 05-15-2003, 08:58 AM   #7
cyberskye
Member
 
Registered: Feb 2003
Location: The City by the Bay
Posts: 116

Rep: Reputation: 15
I meant on your webserver...
 
Old 05-15-2003, 09:01 AM   #8
deesto
Member
 
Registered: May 2002
Location: NY, USA
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448

Original Poster
Rep: Reputation: 31
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
 
Old 05-15-2003, 09:08 AM   #9
cyberskye
Member
 
Registered: Feb 2003
Location: The City by the Bay
Posts: 116

Rep: Reputation: 15
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?
 
Old 05-15-2003, 09:18 AM   #10
deesto
Member
 
Registered: May 2002
Location: NY, USA
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448

Original Poster
Rep: Reputation: 31
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.
 
Old 05-15-2003, 09:34 AM   #11
cyberskye
Member
 
Registered: Feb 2003
Location: The City by the Bay
Posts: 116

Rep: Reputation: 15
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
 
Old 05-15-2003, 09:43 AM   #12
deesto
Member
 
Registered: May 2002
Location: NY, USA
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448

Original Poster
Rep: Reputation: 31
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?
 
Old 05-15-2003, 10:01 AM   #13
cyberskye
Member
 
Registered: Feb 2003
Location: The City by the Bay
Posts: 116

Rep: Reputation: 15
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.
 
Old 05-15-2003, 10:09 AM   #14
deesto
Member
 
Registered: May 2002
Location: NY, USA
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448

Original Poster
Rep: Reputation: 31
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!
 
Old 05-15-2003, 10:23 AM   #15
cyberskye
Member
 
Registered: Feb 2003
Location: The City by the Bay
Posts: 116

Rep: Reputation: 15
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.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
FreeBSD with MySQL/Apache Temujin_12 *BSD 2 11-15-2005 04:43 AM
Apache, MySQL and PHP with FreeBSD? Mega Man X *BSD 9 01-24-2005 05:08 PM
Platform: RedHat or FreeBSD for Apache 2 jj12345 Red Hat 2 10-29-2004 09:10 AM
Optimizing Apache for performance on FreeBSd !! apache Linux - Networking 1 07-28-2004 09:07 AM
Apache 2.0.48 on Freebsd 5.2 problems jamminparidise *BSD 5 03-05-2004 10:58 AM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 06:13 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration