https://certbot.eff.org/#centos6-nginx

https://github.com/kshcherban/acme-nginx

server {
listen 80;

server_name stm.newlook.cn;
root /home/newlook/stm/runtime;

rewrite ^(.*)$ https://$server_name$1 permanent;
access_log /var/log/nginx/host.http2https.access.log
main;

#proxy_cache one;

# location / {
# proxy_set_header X-Forwarded-Host $host;
# proxy_set_header X-Forwarded-Server $host;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_pass http://127.0.0.1:8080/;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "upgrade";
#}

}

server {
listen 443 ssl;
listen [::]:443 ssl;
ssl on;
ssl_certificate /etc/letsencrypt/live/stm.newlook.cn/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/stm.newlook.cn/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

server_name stm.newlook.cn;
root /home/newlook/stm/runtime;

#proxy_cache one;

location / {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8080/;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}

}
history | grep certbot
250 wget https://dl.eff.org/certbot-auto --no-check-certificate
252 yum install certbot
253 certbot certonly
0 0 */28 * * certbot renew --dry-run --pre-hook "service nginx stop" --post-hook "service nginx start"

./certbot-auto certonly --standalone -d puma-iob-staging.system-in-motion.com
crontab -e

0 0 */28 * * ./certbot-auto renew --dry-run --pre-hook "service nginx stop" --post-hook "service nginx start"

puma-iob-staging.system-in-motion.com

certbot+nginx (仅用作个人纪录)的更多相关文章

  1. 实时监控文件变化以及处理xml(仅用作笔记用,防止以后要用)

    private static void WatcherStrat(string path, string filter) { try { FileSystemWatcher watcher = new ...

  2. Nginx 通过 certbot 为网站自动配置 SSL 证书并续期

    一.背景知识 1.1.http 和 https 是什么? 简单来说,http 是一个传输网页内容的协议,比如你看到的 http 开头的网站 http://www.163.com ,其网页上的文字.图片 ...

  3. ZKWeb 官网与演示站点的部署步骤 (Linux + Nginx + Certbot)

    因为没有给域名续费,加上私人时间不足,ZKWeb 的官网和演示站点已经停止了几个月的时间. 最近时间开始变多,所以重新购买了别的域名和服务器把官网和演示站点重新部署上去. 在此前站点是托管在共享主机上 ...

  4. 【Nginx】使用certbot安装免费https证书使Nginx支持Https请求

    certbot官网:https://certbot.eff.org/lets-encrypt/centosrhel7-nginx 一.安装步骤 1)安装certbot,执行  sudo yum ins ...

  5. --with-http_realip_module选项(后台Nginx服务器记录原始客户端的IP地址 )

    转自:http://blog.itpub.net/27043155/viewspace-734234/ 通过这个模块允许我们改变客户端请求头中客户端IP地址值(例如,X-Real-IP 或 X-For ...

  6. 深入剖析Nginx一点小笔记

    前几天在图书馆看书,恰好看到这本<深入剖析nginx>,花了快一周的时间看完了这本书,写点笔记心得便于以后复习. 以前对nginx的认识就只是停留在一个反向代理服务器上.百度了一下ngin ...

  7. 转载:负载均衡器技术Nginx和F5的优缺点对比

    https://blog.csdn.net/zxc456733/article/details/78861100 nginx(一) nginx详解 nginx是一个被广泛使用的集群架构组件,我们有必要 ...

  8. nginx功能介绍和基本安装

    一.简介 nginx是一款自由的.开源的.高性能的HTTP服务器和反向代理服务器:同时也是一个IMAP.POP3.SMTP代理服务器:nginx可以作为一个HTTP服务器进行网站的发布处理,另外ngi ...

  9. 「查缺补漏」巩固你的Nginx知识体系

    Nginx篇 基本介绍 Nginx是一款轻量级的 Web服务器 / 反向代理服务器 / 电子邮件(IMAP/POP3)代理服务器,主要的优点是: 支持高并发连接,尤其是静态界面,官方测试Nginx能够 ...

随机推荐

  1. RoseRT配置高版本的编译器

    RoseRT配置高版本的VC++ ,我有VC++2008 Express ,实习时下载滴! 感谢Google,感谢大神地指导!困扰的问题终于解决,豁然开朗,so开始吧! 第一大步:重中之重, 确保nm ...

  2. Text Justification

    在一段时间没刷题之后,我发现脑子严重地滞涩了.这题AC花了好大力气,出现了Memory Limit Exceed,Core Dump,以及各种普通的编译.运行错误.MLE 和 CD错误是比较难检查的, ...

  3. cheap gucci bags for women finish fashion jewellery has to move

    Is certainly his dresser seem or dress creation process into video clip. Bus dropped???? Especially ...

  4. Android两个页面之间的切换效果工具类

    import android.annotation.SuppressLint; import android.app.Activity; import android.content.Context; ...

  5. druid.properties的配置

    driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://NoOne:3306/eyes<!--需修改--> username=root ...

  6. 使用Object类型的多态引用是会付出代价的

    import java.util.*; public class FiveShi { String name; public void eat(){ System.out.println(" ...

  7. 第七篇——Mobile Apps,软件的曙光。

    作业三: ShrinkWrap (在包装盒子里面的软件,软件在CD/DVD上): Web APP (基于网页的软件): Internal Software (企业或学校或某组织内部的软件): Game ...

  8. Spring中Bean的生命周期方法

    Bean的生命周期方法 src\dayday\Car.java package dayday;import com.sun.org.apache.xpath.internal.SourceTree;i ...

  9. jquery插件链接

    1.jquery版本 http://www.jq22.com/jquery-info122 2.jquery属性 http://www.runoob.com/jsref/prop-radio-valu ...

  10. oracle length and lengthb

    LENGTH──返回以字符为单位的字符串长度. LENGTHB──返回以字节为单位的字符串长度,它和类型定义中的长度是一个概念,比如你定义的varchar2(10)中的10.在不同的数据库,因为字符集 ...