Skip to content

Commit

Permalink
Update default.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
eee555 committed Jun 11, 2024
1 parent 50669fe commit a52a892
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions back_end/saolei/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@ server {
# 配置为你自己服务器的ip地址
server_name fff666.top;

rewrite ^(.*) https://$server_name$1 permanent;

# 给acme放行
location ~ "^/\.well-known/acme-challenge/([-_a-zA-Z0-9]+)$" {
default_type text/plain;
return 200 "xxx";
}
location / {
rewrite ^(.*)$ https://${server_name}$1 permanent;
}

#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;

Expand Down Expand Up @@ -78,15 +85,11 @@ server {
}


# acme重新安装证书步骤:
# acme一般是自动更新,假如没有更新则:
# (1)acme.sh --upgrade --auto-upgrade
# (2)acme.sh --issue -d fff666.top --nginx --debug
# (3)acme.sh --install-cert -d fff666.top --key-file /etc/nginx/conf.d/key.pem --fullchain-file /etc/nginx/conf.d/cert.pem --reloadcmd "nginx -s reload"










# acme更新用
# acme.sh --install-cert -d fff666.top --key-file /etc/nginx/conf.d/key.pem --fullchain-file /etc/nginx/conf.d/cert.pem --reloadcmd "nginx -s reload"

0 comments on commit a52a892

Please sign in to comment.