首页 > php教程 > PHP源码 > 正文

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

WBOY
发布: 2016-06-08 17:31:06
原创
1030 人浏览过
<script>ec(2);</script>

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

六、配置apache支持ssl:

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

再配置一个虚拟主机(可配置成xxx.dingl.com,根据购买的SSL证书设置):

ServerName www.dingl.com
DocumentRoot /home/dingl/jsp-web

ResinConfigServer localhost 6800

AddHandler caucho-request jsp
AddHandler caucho-request xtp
AddHandler caucho-request vm

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

Listen 443

AddType application/x-x509-ca-cert .crt
AddType 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
##

#   General setup for the virtual host
DocumentRoot “/home/dingl/jsp-web”
ServerName www.dingl.com:443
ServerAdmin you@example.com
ErrorLog “/usr/local/apache/logs/error_log”
TransferLog “/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”

相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门推荐
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板