本过程使用 mod_ssl 来配置安全 Apache HTTP Server 版本 1.3 软件。有关其他信息,请参见已安装的 Apache 联机文档 (file:///usr/apache/htdocs/manual/index.html.html)、Apache HTTP Server Web 站点 (http://httpd.apache.org/docs/1.3/) 和 Apache mod_ssl Web 站点 (http://www.modssl.org/docs/)。
使用 cconsole 主窗口访问两个节点。
您可以同时在两个节点上执行以下步骤。
安装所有证书和密钥。
在 /usr/apache/bin 目录中,创建文件 keypass。
将文件权限设置为只有所有者才可访问。
phys-X# cd /usr/apache/bin phys-X# touch keypass phys-X# chmod 700 keypass |
编辑 keypass 文件,以便其针对主机和端口显示加密密钥的密码。
将使用 server:port algorithm 作为参数来调用此文件。确保在使用正确的参数调用该文件时,它可为每个加密密钥显示密码。
随后,当您尝试手动启动 Web 服务器时,它就不会提示您输入密码。例如,假定一个安全 Web 服务器正在使用通过 RSA 加密的私钥侦听端口 8080 和 8888。keypass 文件的内容可能为:
# !/bin/ksh host=`echo $1 | cut -d: -f1` port=`echo $1 | cut -d: -f2` algorithm=$2 if [ "$host" = "apache-lh.example.com" -a "$algorithm" = "RSA" ]; then case "$port" in 8080) echo passphrase-for-8080;; 8888) echo passphrase-for-8888;; esac fi |
更新 Apache 启动/停止脚本文件 /usr/apache/bin/apachect1 中的路径(如果这些路径与 Apache 目录结构有所不同)。