首页
随机
最近更改
特殊页面
社群首页
参数设置
关于WHY42
免责声明
WHY42
搜索
用户菜单
登录
欢迎来到Riguz的小站!这是一个私人wiki,用来记录一些我的笔记。
查看“︁Ubuntu let's encryt nginx”︁的源代码
←
Ubuntu let's encryt nginx
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
= Wild certificate = <syntaxhighlight lang="bash"> sudo certbot certonly --manual --preferred-challenges=dns -d *.fn.quillgen.com </syntaxhighlight> [[Image:wildcard-dns.png|600px]] To verify: https://toolbox.googleapps.com/apps/dig/#TXT/_acme-challenge.fn.quillgen.com = Nginx config= <syntaxhighlight lang="cpp"> server { listen 443 ssl; server_name ~^(.*)\.fn\.quillgen\.com$; ssl_certificate /etc/letsencrypt/live/fn.quillgen.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/fn.quillgen.com/privkey.pem; location / { proxy_pass http://172.20.0.0; # otherwise got 426 Upgrade Required error proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } } # Redirect HTTP to HTTPS server { listen 80; server_name ~^(.*)\.fn\.quillgen\.com$; return 301 https://$host$request_uri; } </syntaxhighlight> [[Category:Linux/Unix]]
返回
Ubuntu let's encryt nginx
。