Hey guys, I am having the oddest issue lately...
I set everything as per instructions and it was working perfectly. However mid day today, while I was configuring a "front hub" page for the Nginx/Letsencrypt, the NextCloud docker is extremely slow to load. The login page loads up after approximately a minute, often missing parts like logo. When I attempt to login the website times out with 504. All the other entries are working fine and fast. Here are my configs:
letsencrypt/nginx/site-confs/default
upstream backend {
server local_ip:19999;
keepalive 64;
}
server {
listen 443 ssl default_server;
listen 80 default_server;
root /config/www;
index index.html index.htm index.php;
server_name _;
ssl_certificate /config/keys/letsencrypt/fullchain.pem;
ssl_certificate_key /config/keys/letsencrypt/privkey.pem;
ssl_dhparam /config/nginx/dhparams.pem;
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
ssl_prefer_server_ciphers on;
client_max_body_size 0;
location /robot.txt {
add_header Content-type text/plain;
return 200 "User-agent: *\nDisallow: /\n";
}
location = / {
auth_basic "Restricted";
auth_basic_user_file /config/nginx/.htpasswd;
try_files $uri $uri/ /index.html /index.php?$args =404;
}
location /sonarr {
auth_basic "Restricted";
auth_basic_user_file /config/nginx/.htpasswd;
include /config/nginx/proxy.conf;
proxy_pass http://local_ip:8989/sonarr;
}
location /transmission {
include /config/nginx/proxy.conf;
proxy_pass http://local_ip:9091/transmission;
}
#PLEX
location /web {
# serve the CSS code
proxy_pass http://local_ip:32400;
}
# Main /plex rewrite
location /plex {
# proxy request to plex server
proxy_pass http://local_ip:32400/web;
}
location /nextcloud {
include /config/nginx/proxy.conf;
proxy_pass https://local_ip:444/nextcloud;
}
location /requests {
auth_basic "Restricted";
auth_basic_user_file /config/nginx/.htpasswd;
include /config/nginx/proxy.conf;
proxy_pass http://local_ip:3000/requests;
}
location ~ /netdata/(?<ndpath>.*) {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://backend/$ndpath$is_args$args;
proxy_http_version 1.1;
proxy_pass_request_headers on;
proxy_set_header Connection "keep-alive";
proxy_store off;
}
}
letsencrypt/nginx/proxy.conf
client_max_body_size 4000M;
client_body_buffer_size 128k;
#Timeout if the real server is dead
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
# Advanced Proxy Config
send_timeout 5m;
proxy_read_timeout 240;
proxy_send_timeout 240;
proxy_connect_timeout 240;
# Basic Proxy Config
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_redirect http:// $scheme://;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_cache_bypass $cookie_session;
proxy_no_cache $cookie_session;
proxy_buffers 32 4k;
/nextcloud/www/nextcloud.config/config.php
<?php
$CONFIG = array (
'memcache.local' => '\\OC\\Memcache\\APCu',
'datadirectory' => '/data',
'instanceid' => 'ocsl2k5v7dsp',
'passwordsalt' => 'BgfEwYx7QOC4P/73FmzHuoBb7Eb3ea',
'secret' => 'lzdo7LGtrhzaN7d6yr4el8Sto+sKJa9F7jQA0r3rU4CfC7YH',
'trusted_domains' =>
array (
0 => 'local_ip',
1 => 'www.xxx.com',
),
'trusted_proxies' =>
array (
0 => 'local_ip',
),
'overwrite.cli.url' => '/nextcloud',
# 'overwritehost' => 'xxx.duckdns.org',
# 'overwriteprotocol' => 'https',
'overwritewebroot' => '/nextcloud',
'dbtype' => 'mysql',
'version' => '11.0.0.10',
'dbname' => 'nextcloud',
'dbhost' => 'local_ip:3305',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'oc_admin',
'dbpassword' => 'OVNb8gG8Ta30pRiEQI0gpM8D8XoA0Q',
'logtimezone' => 'UTC',
'installed' => true,
);
Any help would be greatly appreciated.