Google+

Apache Handler

5

July 30, 2012 by harshalvaidya

What  Apache-Handler is ?

>> it is a means of telling the Apache web server ; how to process a given type of file. By default, Apache only handles certain file types. Apache handlers control how your site’s Apache web server manages certain file types and file extensions. Apache comes configured to handle CGI scripts and server-parsed files. The extensions include: .cgi.pl.plx,  .perl, and .shtml.

If you wish Apache to do a different action, you will need to make a handler to tell Apache to perform that action. For example, if you use a file type that requires a special service to run it, such as a file with server side includes that is not named with a .shtml extension, you need to tell Apache to treat these files differently.


To get regular html pages to handle php code, you need to add this line to your .htaccess file.

AddHandler application/x-httpd-php5 .html .htm

It is highly recommended that you never allow html pages to automatically handle php or shtml, because this forces all of your html pages to be processed by the server first. Instead, please rename your files to .php or .shtml whenever possible.

HTML pages can be sent directly to a visitors browser, with no processing. However, PHP must be processed by the server before it is sent to the visitor, thus using more resources. (If you set that code in your .htaccess, it will work, and it will be more convenient, but it will also greatly increase your resource usage).

The Built-in Apache handlers are :-

default-handler : Send the file to the browser using default_handler() function, which is used to handle default static pages.

send-as-is : Send file with HTTP headers >> mod_asis)

cgi-script : Treat file as CGI script >> mod_cgi

imap-file : Parse as an imagemap rule file >> mod_imagemap

server-info : Get servers config info >> mod_info

server-status : Get servers status stas >> mod_status

You can add customized Apache Handlers directly through Cpanel >> Applications >> Apache Handlers >> Add.

 

Advertisements

5 thoughts on “Apache Handler

  1. debian says:

    Admiring the persistence you put into your website and detailed information you offer.
    It’s great to come across a blog every once in a while that isn’t the same old rehashed information.
    Fantastic read! I’ve bookmarked your site and I’m adding your RSS feeds to
    my Google account.

    • Gracias a bunch..
      Thank you for reading an article..
      The basic intent is to present simplified, the complex things
      Great to hear that.. you are free to comment or mail for any issues..

  2. i agree with your conclusions and will eagerly look forward to your incoming updates. just saying thanks will not just be enough, for the phenomenal clarity in your writing. lista de email lista de email lista de email lista de email lista de email

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog Stats

  • 773 hits

stat

var infolink_pid = 1084591; var infolink_wsid = 0;
%d bloggers like this: