2021-06-22 03:08:34 +00:00
|
|
|
upstream vnc_proxy {
|
|
|
|
server 127.0.0.1:6080;
|
|
|
|
}
|
|
|
|
|
2021-05-22 18:30:52 +00:00
|
|
|
server {
|
2021-05-25 03:24:31 +00:00
|
|
|
listen 80 default_server;
|
2021-06-17 03:15:07 +00:00
|
|
|
listen [::]:80 default_server;
|
2021-05-25 03:24:31 +00:00
|
|
|
server_name _;
|
|
|
|
return 301 https://$host$request_uri;
|
2021-05-22 18:30:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
2021-06-17 03:15:07 +00:00
|
|
|
listen 443 ssl http2;
|
|
|
|
listen [::]:443 ssl http2;
|
2021-05-25 03:24:31 +00:00
|
|
|
server_name exozy.me;
|
2021-05-22 18:30:52 +00:00
|
|
|
|
2021-05-25 03:24:31 +00:00
|
|
|
ssl_certificate /etc/letsencrypt/live/exozy.me/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/letsencrypt/live/exozy.me/privkey.pem;
|
2021-05-22 18:30:52 +00:00
|
|
|
|
2021-05-25 03:24:31 +00:00
|
|
|
root /srv/http/exozy.me;
|
|
|
|
index index.html;
|
|
|
|
|
|
|
|
location /.well-known/matrix/server {
|
|
|
|
return 200 '{"m.server": "chat.exozy.me"}';
|
|
|
|
}
|
2021-07-14 02:35:06 +00:00
|
|
|
|
2021-07-15 17:06:17 +00:00
|
|
|
location /howtuwu {
|
2021-07-16 01:48:48 +00:00
|
|
|
alias /srv/http/exozy.me/howtuwu/public;
|
2021-07-14 02:35:06 +00:00
|
|
|
}
|
2021-05-25 03:24:31 +00:00
|
|
|
|
2021-06-22 03:08:34 +00:00
|
|
|
location /vncws {
|
|
|
|
index vnc.html;
|
|
|
|
alias /usr/share/webapps/novnc/;
|
|
|
|
try_files $uri $uri/ /vnc.html;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /websockify {
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_pass http://vnc_proxy/;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
|
|
|
|
# VNC connection timeout
|
|
|
|
proxy_read_timeout 61s;
|
|
|
|
|
|
|
|
# Disable cache
|
|
|
|
proxy_buffering off;
|
|
|
|
}
|
2021-07-20 15:54:24 +00:00
|
|
|
|
|
|
|
location ~ ^/~$ {
|
|
|
|
rewrite ^~(\w+)\.?.*$ /pages/$1;
|
|
|
|
}
|
2021-06-22 03:08:34 +00:00
|
|
|
|
2021-05-25 03:24:31 +00:00
|
|
|
location / {
|
|
|
|
try_files $uri $uri/ =404;
|
|
|
|
}
|
2021-05-22 18:30:52 +00:00
|
|
|
}
|