Category Archives: Apache2

mod_deflate for faster page load

Just make sure that the Header module is loaded LoadModule headers_module /path/mod_headers.so <IfModule mod_deflate.c> # Insert filter SetOutputFilter DEFLATE # The value must between 1 (less compression) and 9 (more compression). DeflateCompressionLevel 9 # Netscape 4.x has some problems… BrowserMatch … Continue reading

Posted in Apache2 | Tagged , , , | Leave a comment

Disable PHP in directory

In .htaccess php_flag engine off

Posted in Apache2, PHP | Tagged , | Leave a comment

Creating subdomain in Plesk

To have the server point to the subdomain instead of the domain when the url has “www” prefix then do the following: Create /srv/www/vhosts/<domain>/subdomains/<subdomain>/conf/vhost.conf Insert ServerAlias www.<subdomain>

Posted in Apache2 | Tagged , , | Leave a comment

Showing PHP errors

On production environment, you sometimes need to display errors temporarily to see what’s going wrong.  Without the need to modify php.ini, you can add this to .htaccess file on the particular web folder you are working on. php_flag display_errors On … Continue reading

Posted in Apache2 | Tagged | Leave a comment

How to use .htaccess to change default index page

DirectoryIndex alternative-default-home-page.php

Posted in Apache2, Linux Administration, Programming | Tagged | Leave a comment

How to redirect pages to a new domain

RedirectMatch 301 (.*)$ http://www.newdomainhere.com$1 Save this into .htaccess and upload on the root directory on your old domain.

Posted in Apache2, Linux, Linux Administration | Tagged | Leave a comment

Multiple SSL Certificate on Single IP

Follow the links: Virtual host examples from Apache website. http://httpd.apache.org/docs/2.0/vhosts/examples.html Turns out that it is possible to have multiple VirtualHosts on port 80 (Default http), but because of a limitation of SSL, we can’t have multiple VirtualHosts on port 443 … Continue reading

Posted in Apache2, Linux, Linux Administration | Tagged , , | Leave a comment