shell 作cgi的apache配置

寫了一些腳本,當其餘同事有需求的時候就要運行下,這個每次很繁瑣,並且常常被打斷.因此準備把腳本到網站上,讓他們自動運行解決.用到apache mod_cgi模塊.apache

ScriptAlias /cgi-bin/ "/root/bin/"
#
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/root/bin/">
    AllowOverride ALL
    Options +ExecCGI
    Order allow,deny
    Allow from all
</Directory>

1。 目錄需有選項ExecCGI指示詞bash

2。 CGI程式需具可執行狀態ide

3。 CGI需的AddHandler cgi腳本。網站

4。 CGI程式需自行產生的內容類型相關訊息ip

5。命令模式上先確認的CGI程式不會有執行上的錯誤it

6.修改目錄權限.使apache 運行用戶有權訪問這個目錄(我就卡到這裏了,遇到了403)io

相關文章
相關標籤/搜索