当前位置:   article > 正文

nextcloud设置https nextcloud docker配置阿里云SSL证书实现HTTPS访问 亲测方案_nextcloud ssl

nextcloud ssl

1、下载阿里云ssl证书,类型为:apache,得到三个文件两个crt,一个key。

2、把文件夹更名为cert,文件名改为chain.crt,pubilc.crt,web.key。

3、把文件夹复制进nextcloud容器/etc/apache2文件夹中

docker cp /nextcloud/cert nextcloud:/etc/apache2/cert

4、进入容器 执行

  1. a2enmod ssl
  2. a2ensite default-ssl

5、修改ssl.load配置文件

vim /etc/apache2/mods-available/ssl.load

如果有下面这一句就不用修改了,没有就添加上

LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so

6、修改default-ssl.conf配置文件

vim /etc/apache2/sites-available/default-ssl.conf

找到下面三句注释掉或删除

  1. SSLEngine on
  2. SSLCertificateFile    /etc/ssl/certs/ssl-cert-snakeoil.pem
  3. SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
  4. #SSLEngine on
  5. #SSLCertificateFile    /etc/ssl/certs/ssl-cert-snakeoil.pem
  6. #SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

在上面三句的最后面加上以下内容

  1. SSLProtocol all -SSLv2 -SSLv3
  2. SSLCipherSuite HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM
  3. SSLEngine on
  4. SSLCertificateFile /etc/apache2/cert/public.crt
  5. SSLCertificateKeyFile /etc/apache2/cert/web.key
  6. SSLCertificateChainFile /etc/apache2/cert/chain.crt

7、重启apache服务,大功告成!

/etc/init.d/apache2 restart

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/910663
推荐阅读
相关标签
  

闽ICP备14008679号