Ubuntu 7.1 server从无到有搭建jsp/php/rails全能WEB生产环境

作为生产环境,经常需要使用SSL来支持协议,这部分主要为Apache增加SSL支持。

六、配置apache支持ssl:

1、修改Apache配置文件:vi
/usr/local/apache/conf/确保两面这行没有被注释:LoadModule ssl_module
modules/mod_ssl.soInclude conf/extra/

再配置一个虚拟主机(可配置成xxx.dingl.com,根据购买的SSL证书设置):VirtualHost
*:80ServerName /home/dingl/jsp-web

ResinConfigServer localhost 6800

AddHandler caucho-request jspAddHandler caucho-request xtpAddHandler
caucho-request vm/VirtualHost

2、修改ssl配置文件:vi /usr/local/apache/conf/extra/修改成如下形式:

澳门新葡亰手机版,Listen 443

AddType application/x-x509-ca-cert .crtAddType application/x-pkcs7-crl
.crl

SSLPassPhraseDialog builtin

SSLSessionCache
shmcb:/usr/local/apache/logs/ssl_scache(512000)SSLSessionCacheTimeout
300

SSLMutex file:/usr/local/apache/logs/ssl_mutex

#### SSL Virtual Host Context##VirtualHost _default_:443

# General setup for the virtual hostDocumentRoot
/home/dingl/jsp-webServerName you@example.comErrorLog
/usr/local/apache/logs/error_logTransferLog
/usr/local/apache/logs/access_log

# SSL Engine Switch:# Enable/Disable SSL for this virtual
host.SSLEngine on

SSLCipherSuite
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL

SSLCertificateFile
/usr/local/apache/conf/dingl.com.crt#SSLCertificateFile
/usr/local/apache/conf/server-dsa.crt

SSLCertificateKeyFile /usr/local/apache/conf/dingl.com.key