Misc Server Apps

Permanent redirect from http to https in .htaccess

The following redirect rules can be used in the .htaccess for permanently redirecting http to https (secure connection) in Apache with SSL. RewriteEngine on RewriteCond %{HTTPS} !=on RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L] or RewriteEngine on Options +FollowSymLinks RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^.*$ https://www.%{SERVER_NAME}%{REQUEST_URI} [L,R]

Read More »

[Fixed] Name or service not known: mod_unique_id: unable to find IPv4 address of

I completed a new cPanel server setup and found that Apache service is not running. On trying to restart, it failed and the Apache error logs showed following error "[alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "server.example.com" Configuration Failed" I checked the Apache configuration  syntax file by using command /etc/init.d/httpd configtest which was …

Read More »

Modsecurity rule execution error - PCRE limits exceeded

Linux logo

If you are getting following mod_security error in the Apache error logs [Mon Jun 11 16:54:50 2011] [error] [client 171.235.170.226] ModSecurity: Rule 8269d10 [id "-"][file "/usr/local/apache/conf/modsec2.user.conf"][line "763"] - Execution error - PCRE limits exceeded (-8): (null). [hostname "www.example.com"] [uri "/wp-content/themes/daily/timthumb.php"] [unique_id "T9YUytXlXKcADxXq-WUAAAAg"] then to get rid of the error you will have to make some server side changes as the …

Read More »

[Solved] Error: no immediate delivery: more than 10 messages received in one connection

If you are receiving below error message in the exim log "Error: no immediate delivery: more than 10 messages received in one connection" then you will have to edit the exim configuration file and make some changes. 1) Login to the server via shell as a root user 2) Edit the exim configuration file using any favorite editor vi /etc/exim.conf …

Read More »

[How To] Disable mod security on a Linux Server

apache logo

Here is a quick guide about mod_security and how to disable mod_security in various scenarios. Please note that you will require shell access with root user to perform the below steps. The mod_security has two versions and rules for each of them are different. Hence, before adding rule one should be sure about mod_security version. How to find mod_security version? …

Read More »

Unable to include potential exec [ Fixed ]

The Apache version 2.2.3 will not allow to include executable by default because "Options -IncludesNoExec" directive is set to secure  the web server. The CGI includes can be enable by editing .htaccess under your account and updating with the following line. Options +Includes +ExecCGI   If any feedback, queries are always welcome!

Read More »