Linux WDCP nginx环境下开启https
来源:互联网 发布:dmp怎么导入数据库 编辑:程序博客网 时间:2024/05/19 03:45
申请ssl证书
StartSSL
沃通SSL
直接用双引擎更快,更有效,确保iptables把443端口打开。
找到/etc/sysconfig下的iptables打开编辑
把下面这句话在适当的位置加入进去
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
上传申请好的证书和秘钥,下面的是我的证书和秘钥的路径
/www/ssl/blog.dongyonghui.com.crt/www/ssl/blog.dongyonghui.com.key
编辑你站点的配置文件/www/wdlinux/nginx_版本号/conf/vhost里,找到相对应得网址文件加入以下代码即可访问
listen 443 ssl;ssl_certificate /www/ssl/blog.dongyonghui.com.crt;ssl_certificate_key /www/ssl/blog.dongyonghui.com.key;ssl_session_timeout 5m;
就这么简单,搞定之后,重启下面三个服务
service iptables restartservice httpd restartservice nginxd restart
搞定收工
开启就这么简单
如果你想强制性跳转是https,在站点配置文件的合适的地方加上下面几句话
if ($server_port = 80) {return 301 https://$server_name$request_uri;}if ($scheme = http) {return 301 https://$server_name$request_uri;}error_page 497 https://$server_name$request_uri;
阅读全文
0 0
- Linux WDCP nginx环境下开启https
- nginx下开启https
- wdcp 下apache模式开启https访问,支持多站点
- Nginx开启https访问
- WDCP上配置SSL证书即https 2017-08-28 百度总结 操作环境:linux的WDCP操作面板(没有操作面板就在命令行操作) wdcp 安装ssl证书教程实现https访问 1.申请
- 【wdcp/linux/GNU】Nginx服务器ngi…
- Linux 下Nginx SSL/HTTPS 配置
- linux下nginx配置https详解
- Linux下nginx配置https协议访问
- HTTP转HTTPS,Linux下配置Nginx
- linux 下nginx 开启自启动
- linux下nginx开启目录浏览功能
- apache和nginx开启https
- apache和nginx开启https
- apache和nginx开启https
- apache和nginx开启https
- apache和nginx开启https
- Apache和Nginx开启Https
- @Autowired注入dao时失败
- 逻辑门
- OSX10.12.3 Sierra 安装Ipython Notebook
- PCIE Inbound Outbound 地址配置,DMA传输
- Centos7 静态IP配置
- Linux WDCP nginx环境下开启https
- LINK : warning LNK4098: 默认库“MSVCRTD”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
- android studio使用gradle打包正式的apk(非签名)
- opencv中RNG 函数释义
- Mac系统升级Git
- 用一个div模拟textarea的实现
- 分布式session的几种实现方式
- thinkphp使用原生语句多表查询
- 如何去掉滚动条但依旧保留滚动效果