爲什麼cgi腳本必須留在cgi-bin文件夾中?爲什麼cgi腳本必須留在cgi-bin文件夾中?
在public_html文件夾和cgi-bin文件夾中插入python腳本(或php腳本或任何其他腳本)有什麼區別?
我不明白: - \
爲什麼cgi腳本必須留在cgi-bin文件夾中?爲什麼cgi腳本必須留在cgi-bin文件夾中?
在public_html文件夾和cgi-bin文件夾中插入python腳本(或php腳本或任何其他腳本)有什麼區別?
我不明白: - \
他們沒有。唯一的限制是CGI腳本必須在deirectory具有
Options +ExecCGI
指令接通,並且在默認的Apache配置只/ cgi-bin目錄有這個選項。但是沒有任何東西阻止你在其他目錄中啓用CGI。
有人認爲將所有CGI腳本放在一個地方更安全。
它不一定要在cgi-bin中,但你必須指定在哪裏!例如,我把我的主要www文件夾移到你的index.htm文件所在的位置。
#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>
他們不這樣,它取決於你的apache配置。 – skaffman 2010-03-20 13:42:47