Skip to content

Commit de7907b

Browse files
committed
server_name length
1 parent 3775b47 commit de7907b

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

tools/reverse-proxy/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ RUN apk add --no-cache wget gettext
66
# Create templates directory
77
RUN mkdir -p /etc/nginx/templates
88

9+
# Copy custom nginx.conf with increased server_names_hash_bucket_size
10+
COPY nginx.conf /etc/nginx/nginx.conf
11+
912
# Copy nginx configuration template
1013
COPY default.conf.template /etc/nginx/templates/default.conf.template
1114

tools/reverse-proxy/nginx.conf

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
user nginx;
2+
worker_processes auto;
3+
4+
error_log /var/log/nginx/error.log notice;
5+
pid /var/run/nginx.pid;
6+
7+
events {
8+
worker_connections 1024;
9+
}
10+
11+
http {
12+
include /etc/nginx/mime.types;
13+
default_type application/octet-stream;
14+
15+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
16+
'$status $body_bytes_sent "$http_referer" '
17+
'"$http_user_agent" "$http_x_forwarded_for"';
18+
19+
access_log /var/log/nginx/access.log main;
20+
21+
sendfile on;
22+
#tcp_nopush on;
23+
24+
keepalive_timeout 65;
25+
26+
#gzip on;
27+
28+
# Increase server_names_hash_bucket_size to handle long server names
29+
# Default is 64, but we have many long server_name entries
30+
server_names_hash_bucket_size 128;
31+
32+
include /etc/nginx/conf.d/*.conf;
33+
}
34+

0 commit comments

Comments
 (0)