-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy pathhtml.conf
More file actions
43 lines (33 loc) · 992 Bytes
/
html.conf
File metadata and controls
43 lines (33 loc) · 992 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
server {
listen 80;
listen [::]:80;
listen 443 ssl;
listen [::]:443 ssl;
listen 443 quic;
listen [::]:443 quic;
server_name yuming.com;
# SSL 证书配置
ssl_certificate /etc/nginx/certs/yuming.com_cert.pem;
ssl_certificate_key /etc/nginx/certs/yuming.com_key.pem;
# 指定字符编码
charset utf-8;
# HTTP 重定向到 HTTPS
if ($scheme = http) {
return 301 https://$server_name$request_uri;
}
# 根目录和主页设置
root /var/www/html/yuming.com;
index index.html;
# 主页面和静态资源的缓存
location / {
aio threads;
add_header Cache-Control "public, max-age=2592000";
add_header Alt-Svc 'h3=":443"; ma=86400';
}
location ^~ /.well-known/acme-challenge/ {
default_type "text/plain";
root /var/www/letsencrypt;
}
# 客户端最大请求体限制
client_max_body_size 50m;
}