forked from reiz/nginx_proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx_allowlist.conf
37 lines (32 loc) · 887 Bytes
/
nginx_allowlist.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
user www-data;
worker_processes auto;
daemon off; # Don't run Nginx as daemon, as we run it in Docker we need a foreground process.
events { }
http {
server_names_hash_bucket_size 128;
access_log /var/log/nginx_access.log;
error_log /var/log/nginx_errors.log;
# Allowlist Google and Heise
server {
listen 8888;
server_name google.com;
server_name *.google.com;
server_name google.de;
server_name *.google.de;
server_name heise.de;
server_name www.heise.de;
proxy_connect;
proxy_max_temp_file_size 0;
resolver 8.8.8.8;
location / {
proxy_pass http://$http_host;
proxy_set_header Host $http_host;
}
}
# Everything else is denied
server {
listen 8888;
server_name ~.+;
return 404;
}
}