保持快乐,善于表达,敢于创新

PERL, APACHE, SOLARIS CGI 配置

上一篇 / 下一篇  2009-12-25 18:40:17 / 个人分类:solaris 使用大全

今天很高兴能够安装和运行用perl作为脚本语言实现web服务。

配置apache文件

/etc/apache/httpd.conf

更改如下:
更改为红色字体:
-----------------------------------------------------------------------------------

MaxClients256

---------------------------------------------------------------------------------

    #
    # 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/ "/var/apache/htdocs/cgi-bin/"

---------------------------------------------------------------------------------------------
    #
    # "/var/apache/cgi-bin" should be changed to whatever your ScriptAliased
    # CGI directory exists, if you have that configured.
    #
    <Directory "/var/apache/htdocs/cgi-bin">
        AllowOverrideall
        Optionsall
        Order allow,deny
        Allow from all
    </Directory>

</IfModule>
------------------------------------------------------------------------------------------
 #
    # 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

寻找到AddHandler   cgi-script.   .cgi。删除前面的#,在后面加上   .pl。

-------------------------------------------------------------------------------------------
    #
    # AddType allows you to tweak mime.types without actually editing it, or to
    # make certain files to be certain types.
    #
    AddType application/x-tar .tgz
   AddType application/x-httpd-perl .pl


   AddType application/x-httpd-perl .cgi
-------------------------------------------------------------------------------------------------


#  General setup for the virtual host
DocumentRoot "/var/apache/htdocs"
ServerName 10.224.102.11
ServerAdmin mysql@10.224.102.11
ErrorLog /var/apache/logs/error_log
TransferLog /var/apache/logs/access_log








TAG: Apache Perl soalris perl apache

 

评分:0

我来说两句

Open Toolbar