apache配置https

发布时间:2014-03-30 00:48:07 阅读:1284次

 判断httpd是否支持ssl

[root@style js]# httpd -M | grep -E "ssl"
Syntax OK

没有,那么
 

tar -zxvf httpd-2.2.21.tar.gz -C ./httpd
2、./configure --prefix=/usr/local/httpd --enable-module=so --enable-rewrite --enable-ssl=static --with-ssl=/usr/local/ssl --enable-module=ssl --enable-dav --enable-dav-svn --enable-maintainer-mode

3、make & make install
再判断

[root@style js]# httpd -M | grep -E "ssl"
Syntax OK
ssl_module (static) 

将httpd.conf中

#Include conf/extra/httpd-ssl.conf前面的#号去掉

然后修改extra/httpd-ssl.conf

<VirtualHost _default_:443>

#   General setup for the virtual host

DocumentRoot "/var/www/html"

ServerName www.example.com:443

ServerAdmin you@example.com

ErrorLog "/var/www/html/error_log"

TransferLog "/var/www/html/access_log"

#   SSL Engine Switch:

#   Enable/Disable SSL for this virtual host.

SSLEngine on

SSLCertificateFile /usr/local/httpd/conf/extra/server.crt

SSLCertificateKeyFile /usr/local/httpd/conf/extra/server.key

#   SSL Cipher Suite:

#   List the ciphers that the client is permitted to negotiate.

#   See the mod_ssl documentation for a complete list.

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

..................
..................
..................
 
</VirtualHost>

 

 

如有问题,可以QQ搜索群1028468525加入群聊,欢迎一起研究技术

支付宝 微信

有疑问联系站长,请联系QQ:QQ咨询
下一篇:apache配置svn

转载请注明:apache配置https 出自老鄢博客 | 欢迎分享