Created
February 8, 2021 15:39
-
-
Save tuxerrante/e0498ebae316a9e5b286c8daa51ee309 to your computer and use it in GitHub Desktop.
nginx configuration for proxing from a docker image a jenkins server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
daemon off; | |
user nginx; | |
worker_processes 2; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
use epoll; | |
accept_mutex off; | |
} | |
http { | |
include /etc/nginx/mime.types; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
default_type application/octet-stream; | |
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; | |
sendfile on; | |
#tcp_nopush on; | |
keepalive_timeout 65; | |
client_max_body_size 300m; | |
client_body_buffer_size 128k; | |
gzip on; | |
gzip_http_version 1.0; | |
gzip_comp_level 6; | |
gzip_min_length 0; | |
gzip_buffers 16 8k; | |
gzip_proxied any; | |
gzip_types text/plain text/css text/xml text/javascript application/xml application/xml+rss application/javascript application/json; | |
gzip_disable "MSIE [1-6]\."; | |
gzip_vary on; | |
include /etc/nginx/conf.d/*.conf; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment