temp
This commit is contained in:
42
k8s/xiongxiao.me/todos/nginx/look-good.conf
Normal file
42
k8s/xiongxiao.me/todos/nginx/look-good.conf
Normal file
@@ -0,0 +1,42 @@
|
||||
server {
|
||||
server_name look-good.xiongxiao.me;
|
||||
|
||||
client_max_body_size 1024m;
|
||||
|
||||
root /var/www/book/look-good;
|
||||
index index.html index.htm;
|
||||
# 更安全的访问控制
|
||||
location / {
|
||||
try_files $uri $uri.html $uri/ =404;
|
||||
}
|
||||
|
||||
# 隐藏 .git 等敏感文件
|
||||
location ~ /\.(git|svn|hg) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
# 日志路径可自定义
|
||||
access_log /var/log/nginx/look-good.access.log;
|
||||
error_log /var/log/nginx/look-good.error.log;
|
||||
|
||||
listen [::]:443 ssl; # managed by Certbot
|
||||
listen 443 ssl; # managed by Certbot
|
||||
ssl_certificate /etc/letsencrypt/live/look-good.xiongxiao.me/fullchain.pem; # managed by Certbot
|
||||
ssl_certificate_key /etc/letsencrypt/live/look-good.xiongxiao.me/privkey.pem; # managed by Certbot
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||
|
||||
}
|
||||
server {
|
||||
if ($host = look-good.xiongxiao.me) {
|
||||
return 301 https://$host$request_uri;
|
||||
} # managed by Certbot
|
||||
|
||||
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name look-good.xiongxiao.me;
|
||||
return 404; # managed by Certbot
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user