Last active
December 19, 2021 21:34
-
-
Save GodTamIt/d8a86bc96647630250c2f6107fd17b9a to your computer and use it in GitHub Desktop.
BlueBubbles nginx https
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 http; | |
worker_processes auto; | |
error_log /var/log/nginx/error.log ; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; | |
events { | |
multi_accept on; | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
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 logs/access.log main; | |
sendfile on; | |
#tcp_nopush on; | |
#keepalive_timeout 0; | |
keepalive_timeout 65; | |
#gzip on; | |
# HTTPS server | |
server { | |
listen 50443 ssl; | |
server_name bluebubbles-ssl; | |
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; | |
include /etc/letsencrypt/options-ssl-nginx.conf; | |
location / { | |
proxy_pass http://localhost:50925/; | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Client-Verify SUCCESS; | |
proxy_set_header X-Client-DN $ssl_client_s_dn; | |
proxy_set_header X-SSL-Subject $ssl_client_s_dn; | |
proxy_set_header X-SSL-Issuer $ssl_client_i_dn; | |
proxy_set_header X-Forwarded-Proto http; | |
proxy_read_timeout 1800; | |
proxy_connect_timeout 1800; | |
# Allow for WebSockets | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment