19 lines
382 B
Plaintext
19 lines
382 B
Plaintext
|
server {
|
||
|
listen 80;
|
||
|
listen 443 ssl http2;
|
||
|
|
||
|
# 自动重定向 80 到 443 开启 SSL
|
||
|
# if ( $scheme = http ){
|
||
|
# return 301 https://$server_name$request_uri;
|
||
|
# }
|
||
|
|
||
|
access_log ./conf.d/{server}/access.log;
|
||
|
error_log ./conf.d/{server}/error.log;
|
||
|
charset utf-8;
|
||
|
|
||
|
server_name {server_name};
|
||
|
|
||
|
|
||
|
# web 根目录
|
||
|
root /path/to/web;
|
||
|
}
|