73 lines
2.3 KiB
Plaintext
73 lines
2.3 KiB
Plaintext
## Version 2022/10/28
|
|
# make sure that your dns has a cname set for nextcloud
|
|
# assuming this container is called "swag", edit your nextcloud container's config
|
|
# located at /config/www/nextcloud/config/config.php and add the following lines before the ");":
|
|
# 'trusted_proxies' => ['swag'],
|
|
# 'overwrite.cli.url' => 'https://nextcloud.example.com/',
|
|
# 'overwritehost' => 'nextcloud.example.com',
|
|
# 'overwriteprotocol' => 'https',
|
|
#
|
|
# Also don't forget to add your domain name to the trusted domains array. It should look somewhat like this:
|
|
# array (
|
|
# 0 => '192.168.0.1:444', # This line may look different on your setup, don't modify it.
|
|
# 1 => 'nextcloud.example.com',
|
|
# ),
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
|
|
server_name cloud.*;
|
|
|
|
include /config/nginx/ssl.conf;
|
|
|
|
ssl_session_timeout 1d;
|
|
ssl_session_cache shared:MozSSL:10m; # about 40000 sessions
|
|
ssl_session_tickets off;
|
|
|
|
|
|
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305;
|
|
ssl_prefer_server_ciphers on;
|
|
|
|
|
|
client_max_body_size 0;
|
|
|
|
location / {
|
|
include /config/nginx/proxy.conf;
|
|
include /config/nginx/resolver.conf;
|
|
set $upstream_app 192.168.0.123;
|
|
set $upstream_port 32323;
|
|
set $upstream_proto http;
|
|
|
|
|
|
|
|
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
|
|
|
#
|
|
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_hide_header X-Frame-Options;
|
|
proxy_max_temp_file_size 2048m;
|
|
}
|
|
}
|
|
|