Howto: enable HTTP Compression

How to enable HTTP Compression? In order to enable compression, you will need compression modules compiled with Apache. Apache 1.x needs mod_gzip and Apache 2.x need mod_deflate compiled with it. If  you have these module installed, you need to edit your Apache configuration file locate at “/etc/httpd/conf/httpd.conf” file and add […]

Linux Iptables: HowTo Block or Open HTTP/Web Service Port 80 & 443

By default Apache webserver listen on port 80 (http) and port 443 (https i.e. secure http). Apache webserver uses the TCP protocol to transfer information/data between server and browser. The default Iptables configuration does not allow inbound access to the HTTP (80) and HTTPS (443) ports used by the web […]

HTTP 500 error when I run my Perl script

At my work place, we provide shared hosting and http 500 error is the most common in trouble tickets. Although everything is properly configured we still get reports of error. Send MIME type 99% time – it was not servers fault at all. I found that the most common reason […]

How To Use Wget Through Proxy

Wget is a super-useful utility to download pages and automate all types of web related tasks. It works for HTTP as well as FTP URL’s. Here is a brief tutorial on how to use wget through proxy server. To get wget to use a proxy, you must set up an […]

Apache Tips: Disable the HTTP TRACE method

Applies: apache 1.3.x / apache 2.0.x Required apache module: – Scope: global server configuration Type: security Description: How to disable the HTTP TRACE method on recent apache versions. Most vulnerability scanners (like the popular nessus, but commercial ones also) will complain (normally as a low thread or warning level) about […]

Linux wget: Your Ultimate Command Line Downloader

It is a common practice to manage UNIX/Linux/BSD servers remotely over the ssh session. You may need to download download the software or other files for installation. There are a few powerful graphical download manager exits for Linux and UNIX like operating systems: d4x: Downloader for X is a Linux/Unix […]

How to redirect a website using .htaccess?

How to redirect a website using .htaccess? Solution: Redirect website http://mydomain.com to http://www.mynewdomain.com RewriteEngine on RewriteCond %{HTTP_HOST} ^mydomain\.com$ RewriteRule ^(.*)$ http://www.mynewdomain.com [R=301,L] Redirect website mydomain.com with and without www requests to http://www.mynewdomain.com RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.mydomain\.com$ [OR] RewriteCond %{HTTP_HOST} ^mydomain\.com$ RewriteRule ^(.*)$ http://www.mynewdomain.com [R=301,L] Redirect requests from http://mydomain.com to […]

PCRE Library Not Found: Nginx compilation

The HTTP rewrite module requires the PCRE library during the Nginx compilation. The PCRE package contains Perl Compatible Regular Expression libraries useful for implementing regular expression pattern matching. If PCRE is not installed on the server, it will result in the following error message during the Nginx compliation: checking for […]