forked from SasukeFreestyle/XTLS-Iran-TLS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.conf
46 lines (36 loc) · 1.26 KB
/
default.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
36
37
38
39
40
41
42
43
44
45
46
server {
listen unix:/dev/shm/h1.sock proxy_protocol;
set_real_ip_from unix:;
real_ip_header proxy_protocol;
# Edit EXAMPLE.COM to Your domain
server_name EXAMPLE.COM;
location / {
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always; # enable HSTS
root /usr/share/nginx/html; # Modify to the path of the WEB file stored by yourself (check the permissions)
index index.html index.htm;
}
}
server {
listen unix:/dev/shm/h2c.sock http2 proxy_protocol; # HTTP2
set_real_ip_from unix:;
real_ip_header proxy_protocol;
# Edit EXAMPLE.COM to Your domain
server_name EXAMPLE.COM;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always; # enable HSTS
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
server {
listen unix:/dev/shm/h1.sock proxy_protocol default_server;
listen unix:/dev/shm/h2c.sock http2 proxy_protocol default_server;
set_real_ip_from unix:;
real_ip_header proxy_protocol;
server_name _;
return 400;
}