Remote Desktop: Difference between revisions
mNo edit summary |
m tiny fix of syntax in nginx reverse proxy config |
||
| Line 140: | Line 140: | ||
services.nginx = { | services.nginx = { | ||
<nowiki> </nowiki> enable = true; | |||
<nowiki> </nowiki> upstreams."guacamole_server" = { | |||
<nowiki> </nowiki> extraConfig = <nowiki>''</nowiki> | |||
<nowiki> </nowiki> keepalive 4; | |||
<nowiki> </nowiki> <nowiki>''</nowiki>''; | |||
<nowiki> </nowiki> servers = { | |||
<nowiki> </nowiki> "127.0.0.1:8080" = {}; | |||
<nowiki> </nowiki> }; | |||
<nowiki> </nowiki> }; | |||
<nowiki> </nowiki> virtualHosts."remote.mydomain.net" = { | |||
<nowiki> </nowiki> forceSSL = true; # redirect http to https | |||
<nowiki> </nowiki> enableACME = true; | |||
<nowiki> </nowiki> locations."/" = { | |||
<nowiki> </nowiki> extraConfig = <nowiki>''</nowiki> | |||
<nowiki> </nowiki> proxy_buffering off; | |||
<nowiki> </nowiki> proxy_set_header Upgrade $http_upgrade; | |||
<nowiki> </nowiki> proxy_set_header Connection $http_connection; | |||
<nowiki> </nowiki> proxy_set_header X-Real-IP $remote_addr; | |||
<nowiki> </nowiki> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |||
<nowiki> </nowiki> proxy_set_header Host $host; | |||
<nowiki> </nowiki> proxy_set_header X-NginX-Proxy true; | |||
<nowiki> </nowiki> proxy_pass http://guacamole_server/guacamole$request_uri; | |||
proxy_redirect http://guacamole_server/ https://$server_name/; | proxy_redirect http://guacamole_server/ https://$server_name/; | ||
<nowiki> </nowiki> <nowiki>''</nowiki>''; | |||
}; | }; | ||
}; | }; | ||