How do I enable CGI or perl script execution in directories other than the ScriptAlias?

This is undoubtedly the number one question people ask about Apache. The answer, not surprisingly is quite simple... To persuade Apache to execute scripts in other locations, such as in directories where normal documents may also live, you must tell it how to recognize them - and also that it's okay to execute them. For this, you need to use something like the AddHandler directive.

In the specific section of your server's httpd. Conf configuration file, add or uncomment the following line: AddHandler cgi-script . Cgi Add the .

Pl extension to the end of this line if you want to use . Pl extensions If mod_perl is installed make sure the following is not commented out: Alias /perl/ /home/httpd/perl/ SetHandler perl-script PerlHandler Apache::Registry PerlSendHeader On Options +ExecCGI The server will then recognize that all files in that location (and its logical descendants) that end in ". Cgi" or ".

Pl" are script files, not ... more.

Apache recognizes all files in a directory named as a ScriptAlias as being eligible for execution rather than processing as normal documents. This applies regardless of the file name, so scripts in a ScriptAlias directory don't need to be named "*. Cgi" or "*.

Pl" or whatever. In other words, all files in a ScriptAlias directory are scripts, as far as Apache is concerned. To persuade Apache to execute scripts in other locations, such as in directories where normal documents may also live, you must tell it how to recognize them - and also that it's okay to execute them.

For this, you need to use something like the AddHandler directive. More.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions