-
Notifications
You must be signed in to change notification settings - Fork 159
/
Copy pathnginx.conf
35 lines (29 loc) · 879 Bytes
/
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
user nobody nogroup;
worker_processes auto;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
log_format main '[$time_local] $proxy_protocol_addr "$request" "$http_referer" "$http_user_agent"';
access_log /var/log/nginx/access.log main;
error_log /var/log/nginx/error.log;
server {
listen 80;
return 301 https://$host$request_uri;
}
server {
listen unix:/dev/shm/http.socket proxy_protocol;
listen unix:/dev/shm/h2.socket http2 proxy_protocol;
set_real_ip_from unix:;
location / {
if ($host ~* "\d+\.\d+\.\d+\.\d+") {
return 400;
}
resolver 1.1.1.1;
set $example https://www.lovelive-anime.jp;
proxy_pass $example;
proxy_ssl_server_name on;
}
}
}