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/; location ~* \.(html|css|jpg|gif|ico|js)$ { proxy_cache cache; proxy_cache_key $host$uri$is_args$args; proxy_cache_valid 200 301 302 30m; expires 30m; 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 "