Skip to content

Instantly share code, notes, and snippets.

@changeme
Last active August 24, 2017 21:25
Show Gist options
  • Save changeme/7910561352f46c3133e8ae6cc19db0a1 to your computer and use it in GitHub Desktop.
Save changeme/7910561352f46c3133e8ae6cc19db0a1 to your computer and use it in GitHub Desktop.
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;
}
}
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