• certbot+nginx (仅用作个人纪录)


    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

  • 相关阅读:
    hive 数据hadoop数据etl交换
    团队冲刺(三)
    团队冲刺(二)
    CVPR2019论文热词云的实现
    团队冲刺(一)
    团队开发之电梯演讲----团队项目介绍--“益青春APP”
    android的finish()方法
    java web项目通过外网ip访问
    MySQL出现错误1205-Lock wait timeout exceeded; try restarting transaction
    团队开发(自己的理解)
  • 原文地址:https://www.cnblogs.com/ly-radiata/p/6168717.html
Copyright © 2020-2023  润新知