82 lines
2.5 KiB
Plaintext
82 lines
2.5 KiB
Plaintext
upstream nextcloud_backend {
|
|
# server 192.168.88.43; #IP of old tryton server (physical server)
|
|
# server 192.168.88.50:6456; #IP of the docker nextcloud install
|
|
server webserver.nextcloud.svc; #using svc dns name
|
|
# server 192.168.88.52:31236; #IP of the kubernetes #
|
|
# server 1.1.1.1 backup;
|
|
}
|
|
|
|
server {
|
|
server_name nextcloud.tryton.geeraert.eu www.nextcloud.tryton.geeraert.eu;
|
|
location / {
|
|
proxy_pass http://nextcloud_backend/;
|
|
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
# proxy_set_header X-Forwarded-Port $server_port;
|
|
# proxy_set_header X-Forwarded-Scheme $scheme;
|
|
# proxy_set_header X-Forwarded-Proto $scheme;
|
|
# proxy_set_header X-Real-IP $remote_addr;
|
|
# proxy_set_header Accept-Encoding "";
|
|
# proxy_set_header Host $host;
|
|
|
|
# client_body_buffer_size 512k;
|
|
# proxy_read_timeout 86400s;
|
|
# client_max_body_size 0;
|
|
|
|
# Websocket
|
|
# proxy_http_version 1.1;
|
|
# proxy_set_header Upgrade $http_upgrade;
|
|
# proxy_set_header Connection $connection_upgrade;
|
|
|
|
|
|
|
|
# proxy_pass_request_headers on;
|
|
# proxy_no_cache $cookie_nocache $arg_nocache$arg_comment;
|
|
# proxy_no_cache $http_pragma $http_authorization;
|
|
# proxy_cache_bypass $cookie_nocache $arg_nocache $arg_comment;
|
|
# proxy_cache_bypass $http_pragma $http_authorization;
|
|
# proxy_set_header HTTP_AUTHORIZATION $http_authorization;
|
|
|
|
}
|
|
location /.well-known/acme-challenge/ {
|
|
root /var/www/certbot;
|
|
}
|
|
location /.well-known/carddav {
|
|
return 301 $scheme://$host/remote.php/dav;
|
|
}
|
|
|
|
location /.well-known/caldav {
|
|
return 301 $scheme://$host/remote.php/dav;
|
|
}
|
|
|
|
location = /health {
|
|
default_type text/html;
|
|
return 200 "<!DOCTYPE html><h2>health check</h2>\n";
|
|
}
|
|
|
|
listen 443 ssl; # managed by Certbot
|
|
ssl_certificate /etc/nginx/ssl/live/tryton.geeraert.eu/fullchain.pem;
|
|
ssl_certificate_key /etc/nginx/ssl/live/tryton.geeraert.eu/privkey.pem;
|
|
#include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
|
#ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
|
|
|
|
|
}
|
|
server {
|
|
if ($host = www.nextcloud.tryton.geeraert.eu) {
|
|
return 301 https://$host$request_uri;
|
|
} # managed by Certbot
|
|
|
|
|
|
if ($host = nextcloud.tryton.geeraert.eu) {
|
|
return 301 https://$host$request_uri;
|
|
} # managed by Certbot
|
|
|
|
|
|
server_name www.nextcloud.tryton.geeraert.eu nextcloud.tryton.geeraert.eu;
|
|
listen 80;
|
|
return 404; # managed by Certbot
|
|
|
|
}
|
|
|
|
|