Erste lauffähige Version
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
# =============================================================================
|
||||
# App-interner Nginx – HTTP only.
|
||||
# TLS macht der äußere Proxy.
|
||||
# =============================================================================
|
||||
|
||||
user nginx;
|
||||
worker_processes auto;
|
||||
worker_rlimit_nofile 8192;
|
||||
pid /var/run/nginx.pid;
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
|
||||
events {
|
||||
worker_connections 2048;
|
||||
multi_accept on;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main_ext '$remote_addr - $remote_user [$time_iso8601] '
|
||||
'"$request" $status $body_bytes_sent '
|
||||
'"$http_referer" "$http_user_agent" '
|
||||
'xff="$http_x_forwarded_for" '
|
||||
'rt=$request_time urt="$upstream_response_time"';
|
||||
access_log /var/log/nginx/access.log main_ext;
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 65;
|
||||
server_tokens off;
|
||||
|
||||
# CSVs etc. – am äußeren Proxy spiegeln!
|
||||
client_max_body_size 25M;
|
||||
client_body_buffer_size 128k;
|
||||
client_body_timeout 60s;
|
||||
client_header_timeout 30s;
|
||||
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_proxied any;
|
||||
gzip_comp_level 6;
|
||||
gzip_types text/plain text/css application/json application/javascript
|
||||
text/xml application/xml application/xml+rss text/javascript
|
||||
image/svg+xml;
|
||||
|
||||
limit_req_zone $binary_remote_addr zone=login:10m rate=5r/m;
|
||||
limit_req_zone $binary_remote_addr zone=app:10m rate=30r/s;
|
||||
limit_conn_zone $binary_remote_addr zone=conn_per_ip:10m;
|
||||
|
||||
upstream django_app {
|
||||
server web:8000 max_fails=3 fail_timeout=30s;
|
||||
keepalive 32;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
}
|
||||
Reference in New Issue
Block a user