Linux下配置cgi環境

2021-04-13 00:01:25 字數 576 閱讀 2066

在apche下配置cgi的幾點注意事項:

apache載入cgi模組

使用 scriptalias url directory 命令在httpd.conf中將url和存放cgi指令碼的目錄進行對映;

儲存檔案重啟伺服器

在用cgi指令碼中,開始必須輸出html文件頭且以文件頭後緊跟換行,否則會出現500錯誤,在其之後就可以開始cgi指令碼的編寫了,下面一python為例: #

!/usr/bin/python                      

print

"content-type: text/html "#

####################################

#compute and print whatever you want :)        #

#####################################

print

"hello, cgi!"

5. 指令碼寫好後許可權一定要修改為可執行的,一般為755

6. 指令碼的字尾沒有關係,但是在指令碼檔案的第一行一定要指明用來解釋指令碼的程式

linux下配置php環境

我 文章,可惜忘了出處,這裡對不起作者。新版的老版的還是有些不同的。現在把步驟帖一下 安裝步驟 存至 home tmp目錄 命令列表 cd home tmp rpm ivh mysql 3.23.52 1.i386.rpm 安裝mysql server rpm ivh mysql client 3....

linux下 mysq l環境配置

mysql server community 5.1.62 1.rhel5 mysql devel community 5.1.62 1.rhel5 mysql shared compat 5.1.62 1.rhel5 mysql client community 5.1.62 1.rhel5 安裝...

Linux環境下VNC配置

第一次啟動要設定vnc遠端登入所需的密碼 root xcorder vncserver you will require a password to access your desktops.password verify xauth 上面這段話表示起動了乙個圖形終端,編號為1,要記住這個編號,等下...