~dricottone/container-images

ref: 8ffffdd7748e8df768d4178461734fa4e5e1df7e container-images/nginx/nginx.conf -rw-r--r-- 1.3 KiB
8ffffdd7Dominic Ricottone Experimental pypy2+uwsgi container a day ago
                                                                                
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
user nginx;
worker_processes auto;
pcre_jit on;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
include /etc/nginx/modules/*.conf;

events {
	worker_connections 1024;
}

http {
	include /etc/nginx/mime.types;
	default_type application/octet-stream;

	map $http_upgrade $connection_upgrade {
		default upgrade;
		''      close;
	}

	server_tokens off;
	client_max_body_size 1m;
	sendfile on;
	tcp_nopush on;
	ssl_protocols TLSv1.2 TLSv1.3;
	ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384;
	ssl_prefer_server_ciphers on;
	ssl_session_cache shared:SSL:2m;
	ssl_session_timeout 1h;
	ssl_session_tickets off;
	gzip_vary on;

	# Fuck you Semrush
	deny 85.208.96.0/24;
	deny 185.191.171.0/24;

	# Fuck you OpenAI
	deny 20.171.206.0/24;

	# Fuck you Google
	deny 66.249.69.0/24;
	deny 66.249.75.0/24;

	# Fuck you Ahref
	deny 51.222.253.0/24;

	# Fuck you Bytedance
	deny 47.128.32.0/24;
	deny 47.128.37.0/24;
	deny 47.128.48.0/24;

	log_format main '$remote_addr - $remote_user [$time_local] "$request" '
		'$status $body_bytes_sent "$http_referer" '
		'"$http_user_agent" "$http_x_forwarded_for"';

	access_log /var/log/nginx/access.log main;

	include /etc/nginx/http.d/*.conf;
}