Archive for the ‘Apache’ Category

Adding exceptions for Apache mod_sec 2.5

I have some developers working on a site on a cPanel/WHM CentOS 5 server which has Apache running with the mod_security or mod_sec module running. This is a module that prevents several types of attacks against the server. It is sometimes referred to as an open source intrusion detection and prevention engine for web applications, or web application firewall.

To make a long story short, you can place rules in a configuration file, and if those rules are triggered during an HTTP request, the client is refused, usually with an HTTP 406 error.

Anyway, the developer’s IP address was getting added to the blocked list the CSF firewall, which basically blocked any type of access to the server from their IP addresss (HTTP, SSH, FTP, etc.) Read the rest of this entry »

Good to know when manually updating Apache configuration

For those out there that run WHM/cPanel servers and like to get under the hood to configure Apache outside of the WHM interface, here’s a need to know tip.

These commands must be run if you add any custom configurations to /usr/local/apache/conf/httpd.conf

This is because in cpanel/whm, the apache configuration is saved into a database for safe keeping, and when whm updates or rebuilds apache configuration it pulls the previous configuration from database.

This command must be run after the save

$ /usr/local/cpanel/bin/apache_conf_distiller --update

This command can be run to test if you changes were saved because it reloads the httpd.conf file from database.
/usr/local/cpanel/bin/build_apache_conf

I should also say that this is for Centos 5 servers (and probably RHEL too).

Consulting

I'm currently available
for Lotus Notes / Domino consulting engagements.

LinkedIn

Connect with me:

LinkedIn

Advertisement
Advertisement
Categories