-
Notifications
You must be signed in to change notification settings - Fork 187
/
nginx.conf
35 lines (32 loc) · 1.12 KB
/
nginx.conf
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
server {
listen 80;
server_name xin-tan.com;
# nginx最新写法
return 301 https://$server_name$request_uri;
location / {
root /home/ubuntu/data/blog-static;
index index.html index.htm index.nginx-debian.html;
try_files $uri $uri/ =404;
}
}
server {
listen 443 ssl;
#填写绑定证书的域名
server_name xin-tan.com;
#证书文件名称
ssl_certificate /home/ubuntu/data/blog-https/1_xin-tan.com_bundle.crt;
#私钥文件名称
ssl_certificate_key /home/ubuntu/data/blog-https/2_xin-tan.com.key;
ssl_session_timeout 5m;
#请按照以下协议配置
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
#请按照以下套件配置,配置加密套件,写法遵循 openssl 标准。
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
location / {
#网站主页路径。此路径仅供参考,具体请您按照实际目录操作。
root /home/ubuntu/data/blog-static;
index index.html index.htm index.nginx-debian.html;
try_files $uri $uri/ =404;
}
}