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

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.

Leave a Reply

Your email address will not be published. Required fields are marked *