Last active
August 24, 2017 21:25
-
-
Save changeme/7910561352f46c3133e8ae6cc19db0a1 to your computer and use it in GitHub Desktop.
nginx guacamole reverse proxy let'sencrypt. Original: https://www.reddit.com/r/homelab/comments/5m1fng/finally_got_nginx_reverse_proxy_working_with_lets/
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
server { | |
listen 443 ssl; | |
server_name sub.domain.com; | |
ssl on; | |
ssl_certificate /etc/letsencrypt/live/sub.domain.com/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/sub.domain.com/privkey.pem; | |
location / { | |
proxy_buffering off; | |
proxy_pass http://[IPADDRESS]:[PORT]/guacamole/; | |
proxy_http_version 1.1; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection $http_connection; | |
access_log off; | |
} | |
location /.well-known/ { | |
allow all; | |
root /var/www/html; | |
} | |
} |
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 nginx; | |
worker_processes 2; # Set to number of CPU cores | |
error_log /var/log/nginx/error.log; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include /etc/nginx/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 /var/log/nginx/access.log main; | |
root /var/www/html; | |
sendfile on; | |
keepalive_timeout 65; | |
include /etc/nginx/conf.d/*.conf; | |
index index.html index.htm; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment