You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by David Mehler <da...@gmail.com> on 2018/03/31 01:09:54 UTC

[users@httpd] processing cgi scripts

Hello,

Confusion, I am running Apache 2.4 and am being asked to process cgi
scripts in various languages. I've got two directories made outside
the document root called language1 and language2, so the document root
is:
/usr/vhosts/example.com/htdocs

the language directories are:

/usr/vhosts/example.com/language1
/usr/vhosts/example.com/language2

I've got this in a virtual host:

# Support language1 scripts
ScriptAlias "/language1/" "/usr/vhosts/example.com/language1/"
<Directory "/usr/vhosts/example.com/language1">
Options None
AllowOverride None
Require all granted
</Directory>

I've also seen that options directive as:

Options +ExecCGI
and an AddHandler directive:
AddHandler cgi-script .lg1 .lg2

What situations would I use the +ExecCGI and AddHandler options vs the
ScriptAlias and a directory block?

Also I've got some scripts in a directory called /example and if I go
/example/script1.extension works fine, but if I just do /example I get
a 404 even though there's an index.extension file in it that is valid.
Can I correct this?

Thanks.
Dave.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org