Created
August 1, 2022 18:34
-
-
Save Apoc70/54d8a798289a0b157d620a1e8a748b9c to your computer and use it in GitHub Desktop.
Partial nginx.conf file for an Exchange 2019 reverse proxy configuration
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
user www-data; | |
worker_processes auto; | |
pid /run/nginx.pid; | |
load_module modules/ndk_http_module.so; | |
load_module modules/ngx_http_lua_module.so; | |
load_module modules/ngx_stream_lua_module.so; | |
load_module modules/ngx_http_headers_more_filter_module.so; | |
events { | |
worker_connections 768; | |
# multi_accept on; | |
} | |
http { | |
## | |
# Basic Settings | |
## | |
sendfile on; | |
tcp_nopush on; | |
tcp_nodelay on; | |
keepalive_timeout 65; | |
types_hash_max_size 2048; | |
server_tokens off; | |
# server_names_hash_bucket_size 64; | |
# server_name_in_redirect off; | |
include /etc/nginx/mime.types; | |
default_type application/octet-stream; | |
## | |
# Logging Settings | |
## | |
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; | |
error_log /var/log/nginx/error.log; | |
## | |
# Gzip Settings | |
## | |
gzip off; | |
gzip_disable "msie6"; | |
# gzip_vary on; | |
# gzip_proxied any; | |
# gzip_comp_level 6; | |
# gzip_buffers 16 8k; | |
# gzip_http_version 1.1; | |
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; | |
## | |
# Virtual Host Configs | |
## | |
include /etc/nginx/conf.d/*.conf; | |
include /etc/nginx/sites-enabled/*; | |
upstream owa { | |
server 10.11.12.13:443; | |
ntlm; | |
sticky learn create=$remote_addr lookup=$remote_addr | |
zone=client_sessions:10m timeout=3h; | |
} | |
proxy_read_timeout 3h; | |
server { | |
listen *:444 ssl; | |
server_name owa.varunagroup.de autodiscover.varunagroup.de hybrid.varunagroup.de; | |
root /usr/share/nginx/html ; | |
index index.html; | |
underscores_in_headers on; | |
access_log /var/log/nginx/owa.varunagroup.de/access444.log main; | |
error_log /var/log/nginx/owa.varunagroup.de/error444.log; | |
#error_log /var/log/nginx/owa.varunagroup.de/debug.log debug; | |
## TLS-Optionen | |
ssl_certificate /etc/nginx/ssl/owa.varunagroup.de_2021_fullchain.crt; | |
ssl_certificate_key /etc/nginx/ssl/private/owa-4096.2019.key; | |
ssl_dhparam /etc/nginx/ssl/dhparam-owa.pem; | |
ssl_session_cache shared:ssl_cache:512m; | |
ssl_session_timeout 60m; | |
ssl_prefer_server_ciphers on; | |
ssl_protocols TLSv1.2; | |
## Kompatibilitaets-Ciphers | |
ssl_ciphers 'DHE-DSS-AES128-GCM-SHA256:DHE-DSS-AES256-GCM-SHA384:DHE-DSS-AES256-SHA256:DHE-RSA-AES128-GCM-SHA2 | |
56:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM- | |
SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES | |
256-SHA384'; | |
location / { | |
client_max_body_size 2G; | |
proxy_buffering off; | |
proxy_request_buffering off; | |
proxy_http_version 1.1; | |
proxy_read_timeout 3600; | |
proxy_pass_request_headers on; | |
proxy_pass_header Date; | |
proxy_pass_header Server; | |
proxy_set_header Connection "Keep-Alive"; | |
proxy_set_header Accept-Encoding ""; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Forwarded-Host $host; | |
proxy_set_header X-Forwarded-Server $host; | |
proxy_set_header X-Forwarded-Proto https; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
more_set_input_headers 'Authorization: $http_authorization'; | |
proxy_pass https://owa; | |
proxy_redirect https://owa.varunagroup.de:444/ https://owa.varunagroup.de/; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment