Configure Apache to listen multiple ports

The listen directive in the Apache configuration file can be used to make Apache to listen in a particular port or IP address or port combination.

Listen 80
Listen 8000

In this format the Apache server listens on the given ports on all interfaces (IP addresses) which are up in the server. If you mention the above two directives in the Apache configuration file then the Apache server will listen on both the ports 80 and 8000. Multiple Listen directives may be used to specify a number of addresses and ports to listen to.

Listen IP:80

You need to replace the IP address in this example with the IP address you want the Apache service to listen. In this format an IP address is given as well as a port. In this case the server will listen on the given port and interface( IP address ). If you want the Apache service to listen on two IP addresses in the server you can use multiple listen directive in the configuration file.

Listen IP1:80
Listen IP2:80

Please remember to restart the Apache service in the server once the changes are made to the configuration file.


What is mod_evasive?

What is mod_evasive?

mod_evasive is an evasive maneuvers module for Apache to provide evasive action in the event of an HTTP DoS or DDoS attack or brute force attack. It is also designed to be a detection and network management tool, and can be easily configured to talk to ipchains, firewalls, routers, and etcetera. mod_evasive presently reports abuses via email and syslog facilities.

Detection is performed by creating an internal dynamic hash table of IP Addresses and URIs, and denying any single IP address from any of the following:

* Requesting the same page more than a few times per second
* Making more than 50 concurrent requests on the same child per second
* Making any requests while temporarily blacklisted (on a blocking list)

Downloads:

Stable [ Version 1.10.1 ] mod_evasive for Apache v1.3 and 2.0

Apache HTTP server benchmarking tool

ApacheBench is actully a command line program for measuring the performance of HTTP web servers. It was designed to give an idea of the performance that a given Apache installation can provide.

For bench marking the apache we can use the tool ab.

ab is a tool for benchmarking your Apache Hypertext Transfer Protocol (HTTP) server. It is designed to give you an impression of how your current Apache installation performs. This especially shows you how many requests per sec-ond your Apache installation is capable of serving.

The syntax for using the tool is as follows.

$ ab -n 10 -c 2 http://www.your-domain-name.com/index.html

-n: specifies the number of request that is to be sent to the apache server for the bench marking session.
-c: specifies the number of multiple requests to perform at a time to the server.

WHM failed to receive Apache Status

If the WHM is not showing the Apache status, make sure that the whm-server-status is added in the configuration.

$ vi /usr/local/apache/conf/httpd.conf

Then add the following entries in the Apache configuration file and then save.

<Location /whm-server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
ExtendedStatus On

Restart the apache service.

$ /scripts/restartsrv_httpd

cPanel Proxy

cPanel Proxy

This script is made for people who use cPanel. Its purpose is to give access to cPanel (including webmail and WHM) at port 80 by acting like a proxy. (For people behind strict firewalls.) It can be installed by server owner, reseller or end-users.

Installation instructions:

- Create subdomain “cpanel.yourdomain.com” (You’ll probably need access to cPanel for this, so install it before you need it!)
- Download and unzip cPanelProxy.zip (if you haven’t already) from http://cpanelproxy.net/
- Upload the files to the subdomains directory, probably “public_html/cpanel” in FTP. Be sure to remember .htaccess!
Needed files: cpanelproxy.php .htaccess php.ini

Install for webmail and whm:

- Repeat with “webmail” in stead of “cpanel” in subdomain and directory.
- Repeat with “whm” in stead of “cpanel” in subdomain and directory.

Auto Installer:

- A new feature on the website makes it easier to install cPanel Proxy, and you can even do it thru your firewall. All you need to do is to enter your cPanel login information, at the auto installer will take care of the rest. http://cpanelproxy.net/autoinstaller

« Prev - Next »