今天很高兴能够安装和运行用
perl作为脚本语言实现
web服务。
配置
apache文件
/etc/apache/httpd.conf
更改如下:
更改为红色字体:
-----------------------------------------------------------------------------------
MaxClients
256---------------------------------------------------------------------------------
#
# 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">
AllowOverride
all Options
all 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.11ServerAdmin mysql@10.224.102.11ErrorLog /var/apache/logs/error_log
TransferLog /var/apache/logs/access_log