Created
January 5, 2017 04:35
-
-
Save changeme/f672d63366ef77547eabdf27a28fef71 to your computer and use it in GitHub Desktop.
nginx guacamole reverse proxy let'sencrypt.
This file contains hidden or 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 hidden or 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