Website Scripts And Cloud Tutorials

ScriptAlias and Alias in httpd.conf at a glance

Byadmin

Jun 9, 2010 , , ,

Last updated on January 3rd, 2022 at 05:15 pm

Click to rate this tutorial!
[Total: 2 Average: 3]

Here i am gonna quickly explain you the difference between ScriptAlias and Alias
example:

ScriptAlias /cgi-bin / www/cgi-bin/

A request for http://mywebpage.com/cgi-bin/foobar would cause the server to run the script /www/cgi-bin/foobar.

This configuration is essentially equivalent to:

Alias /cgi-bin/ /www/cgi-bin/
<Location /cgi-bin >
SetHandler cgi-script
Options +ExecCGI
</Location>

It is safer to avoid placing CGI scripts under the DocumentRoot in order to avoid accidentally revealing their source code if the configuration is ever changed.

The same has been reflected in Apache Mod document.

Click to rate this tutorial!
[Total: 2 Average: 3]

Leave a Reply

Your email address will not be published.