Select Category
Sitemap Help Contact
print article

Modify the Apache Configuration

You are not able to make changes to Apache webserver configuration via a httpd.conf file. There is a default httpd.conf file already in place for a default configuration for all customers. To make changes to the webserver configuration, you will need to create a .htaccess file.

Using this method you can make specific changes to the webserver configuration such as enabling file/folder listing publicly, define custom error pages, redirect incoming traffic, etc. In this way, you can make changes that will only affect your websites. The .htaccess file is recursive, meaning that the configuration settings within the file will apply to the folder where the .htaccess file is saved as well as subfolders and files.

The following is a list of directives which can be used in a ".htaccess" file:

Command Description
ErrorDocument Define your own custom error pages
AddType Assign a MIME-Type to a file ending
RewriteEngine Activate mod_rewrite module
Allow/Deny Host or IP based access control
FilesMatch File based access control
AuthType "Basic" password check
Redirect Redirection to another page or site
Options (de)activate index, symbolic links, etc.

Some examples

Enable file/folder listing:
Options +Indexes

Turning "spell checking" off. This is on by default and will therefore load if does not exist
CheckSpelling off

Allow other file extensions to be handled as CGI scripts:
AddHandler cgi-script .cgi .asp

Allow other file extensions for SSI (Server Side Include) scripts:
AddType text/x-server-parsed-html .shtm .shtml .htm .html

For additional information, you may want to reference: