apache配置https

 判断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>

 

 

    A+
发布日期:2014年03月30日  所属分类:未分类

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: