ScriptAlias having no effect on ability to execute .cgi files
I have enabled alias_module and cgi_module in my apache 2.2 installation. I have added a section:
<IfModule alias_module>
ScriptAlias /digin-cgi/ "/opt/openbdjam/webroot1/push20/digin-cgi/"
</IfModule>
my scripts are 'x' executable permissioned and live in the file system directory /opt/openbdjam/webroot1/push20/digin-cgi. However, when i go to my webserver (something like the address below) in a browser i just get a 404 not found:
- http://myserver.com/digin-cgi/test.cgi
In case it matters - my server root is set to:
DocumentRoot "/opt/openbdjam/webroot1"
no amount of restarting helps!
开发者_C百科any ideas?
I beleive you'll need a directory declaration in there also. Since the cgi-bin is outside your document root, it isn't covered by the 'default'.
<Directory "/opt/openbdjam/webroot1/push20/digin-cgi/">
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Alter your Options and AllowOverride settings as you see fit, but I imagine you'll want ExecCGI as a minimum.
More info here: http://httpd.apache.org/docs/current/mod/core.html#directory
精彩评论