配置apache2 https

来源:互联网 发布:企业办公通讯软件 编辑:程序博客网 时间:2024/05/06 06:22
版本:Apache/2.4.23
很简单

加上下面的link文件就可以了,分别在mods-available和sites-available(默认没有下面的link文件)

lrwxrwxrwx 1 root root   40 Feb 16 19:29 000-default-ssl -> /etc/apache2/sites-available/default-ssl
lrwxrwxrwx 1 root root   45 Feb 16 19:32 000-default-ssl.conf -> /etc/apache2/sites-available/default-ssl.conf
lrwxrwxrwx 1 root root   26 Feb 16 18:17 ssl.conf -> ../mods-available/ssl.conf
lrwxrwxrwx 1 root root   26 Feb 16 18:17 ssl.load -> ../mods-available/ssl.load


注:
--启动错误ssl.conf,注释了下面3行
 38     #   Inter-Process Session Cache:
 39     #   Configure the SSL Session Cache: First the mechanism 
 40     #   to use and second the expiring timeout (in seconds).
 41     #   (The mechanism dbm has known memory leaks and should not be used).
 42     #SSLSessionCache         dbm:${APACHE_RUN_DIR}/ssl_scache
 43     #SSLSessionCache        shmcb:${APACHE_RUN_DIR}/ssl_scache(512000)
 44     #SSLSessionCacheTimeout  300

--生成证书,参见下面,这个apach2的版本已经不需要这个配置了,自己生成也没有问题,使用原来的可以(default-ssl.conf)
http://www.cnblogs.com/best-jobs/p/3298258.html

--遇到问题可以查看apache2的log文件,/var/log/apache2,也许会找到线索

--注意DocumentRoot的设置
0 0
原创粉丝点击