Why cgi scripts have to stay in cgi-bin folder?
Why cgi scripts have to stay in cgi-bin folder ?
What is the difference from insert python script ( or php script or any other script ) in public_html folder and in cgi-bin folder ?
I don't un开发者_C百科derstand :-\
They don't have. The only restriction is that CGI scripts have to be in deirectory which has
Options +ExecCGI
directive switched on, and in default Apache configuration only /cgi-bin directory has this option on. But nothing prevents you from enabling CGI in other directories.
Some believe that putting all CGI scripts in one place is more secure.
It does not have to be in the cgi-bin, but you have to specify where! For example I moved mine to my main www folder where your index.htm file would be.
#ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" <-This was the original
ScriptAlias /html/ "/var/www/html"
#
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#Directory below used to be /var/www/cgi-bin
<Directory "/var/www/html">
AllowOverride None
Options ExecCGI <-this line used top be Options None
Order allow,deny
Allow from all
</Directory>
精彩评论