Q. I'm running Apache 2 server under FreeBSD jail. However, I see lots of warning error messages in /var/log/httpd-error.log as follows:
[Sat Sep 20 20:47:09 2008] [warn] (61)Connection refused: connect to listener on 0.0.0.0:80
[Sat Sep 20 20:47:10 2008] [warn] (61)Connection refused: connect to listener on 0.0.0.0:80
[Sat Sep 20 20:47:11 2008] [warn] (61)Connection refused: connect to listener on 0.0.0.0:80
How do stop all these warning messages flooding my Apache log files?
A. Under FreeBSD jail you do not have loopback address - 127.0.0.1 and 0.0.0.0. So do not configure any server including httpd with 0.0.0.0 or 127.0.0.1 IP address. You need to always set your actual, real IP. Open httpd.conf
# vi /usr/local/etc/apache22/httpd.conf
Find out Listen directive:
#Listen 12.34.56.78:80
Listen directive allows you to bind Apache to specific IP addresses and/or ports, instead of the default. Change this to Listen on specific IP addresses as shown below to prevent Apache from glomming onto all bound IP addresses i.e. 0.0.0.0 which is not available in jail, so if your IP is 202.54.1.2, enter:
Listen 202.54.1.2:80
Save and close the file. Restart apache:
# /usr/local/etc/rc.d/apache22 restart
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop






![Apache: [warn] _default_ VirtualHost overlap on port 80, the first has precedence Error and Solution](http://s13.cyberciti.org/images/shared/rp/3/14.jpg)








{ 0 comments… add one now }