国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網(wǎng)站 > Apache > 正文

讓Apache支持cgi、SSI、shtml的配置方法

2024-08-27 18:26:47
字體:
供稿:網(wǎng)友

1.首先明確,只能夠指定某個確定的目錄,支持cgi,即運(yùn)行該目錄執(zhí)行cgi程序;否則不太安全。
尋找:

復(fù)制代碼 代碼如下:

    #
    # "C:/Program Files/Apache Group/Apache/cgi-bin" should be changed to whatever your ScriptAliased
    # CGI directory exists, if you have that configured.
    #
    <Directory "E:/Website_Field/cgi">
        AllowOverride all
        Options all
        Order allow,deny
        Allow from all
    </Directory>

設(shè)置Directory為可以執(zhí)行cgi的目錄

2.
尋找:

復(fù)制代碼 代碼如下:

    #
    # ScriptAlias: This controls which directories contain server scripts.
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the realname directory are treated as applications and
    # run by the server when requested rather than as documents sent to the client.
    # The same rules about trailing "/" apply to ScriptAlias directives as to
    # Alias.
    #
    ScriptAlias /cgi-bin/ "E:/Website_Field/cgi"

將之后的目錄改成和上面的相同。

3.
設(shè)置cgi腳本的后綴,尋找:

復(fù)制代碼 代碼如下:

   #
    # AddHandler allows you to map certain file extensions to "handlers",
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action command (see below)
    #
    # If you want to use server side includes, or CGI outside
    # ScriptAliased directories, uncomment the following lines.
    #
    # To use CGI scripts:
    #
    AddHandler cgi-script .cgi .pl

設(shè)置后綴如.cgi, .pl等等,任意可以想到的,但是避免使用已有的如.html, .asp, .php等

注意:設(shè)置支持cgi的目錄之后,該目錄下的內(nèi)容及子目錄的內(nèi)容都可以執(zhí)行。

配置Apache支持SSI,即服務(wù)器端解析的server-parsed html(shtml)
關(guān)于什么是SSI以及什么是shtml,請參看本站的其他兩篇文章。
使用SSI可以實(shí)現(xiàn)html的動態(tài)嵌入內(nèi)容,可以為一下SSI的命令,甚至是系統(tǒng)返回結(jié)果,以及比較常用的調(diào)用Perl程序(尤其是perl的cgi返回結(jié)果)

1. 配置Apache:
1)首先找到:

復(fù)制代碼 代碼如下:

   #
    # To use server-parsed HTML files
    #
    AddType text/html .shtml
    AddHandler server-parsed .shtml
發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 鄢陵县| 巴林右旗| 玉环县| 卢氏县| 亚东县| 布尔津县| 丹棱县| 博白县| 宾川县| 太仓市| 梁平县| 来宾市| 若羌县| 葵青区| 河北省| 天津市| 左贡县| 华蓥市| 朝阳市| 大埔区| 阳朔县| 乌拉特前旗| 临颍县| 信宜市| 新晃| 高邮市| 边坝县| 尼玛县| 红河县| 平定县| 通化市| 临泽县| 舞钢市| 龙海市| 宝清县| 永德县| 措勤县| 武威市| 和林格尔县| 镇坪县| 兴隆县|