Hello,
After having my server’s database die on me, and rebuilding my server from scratch, I’m running into a strange issue with my reverse proxy config.
Here’s the setup:
Nextcloud Server: Ubuntu 24.04 LTS, NC Version 30.0.4
Reverse Proxy: Arch Linux - Nginx Reverse Proxy 1.26.2
Cloudflare Proxy
Here’s my snippet of my config.php file:
'trusted_domains' =>
array (
0 => 'localhost',
1 => '[Omitted - IP of NextCloud server]',
2 => '[Omitted - hostname of server]',
3 => 'cloud.xylerfox.ca',
),
'trusted_proxies' =>
array (
0 => '[Omitted - IP of Nginx Reverse Proxy Server]',
1 => '173.245.48.0/20',
2 => '103.21.244.0/22',
3 => '103.22.200.0/22',
4 => '103.31.4.0/22',
5 => '141.101.64.0/18',
6 => '108.162.192.0/18',
7 => '190.93.240.0/20',
8 => '188.114.96.0/20',
9 => '197.234.240.0/22',
10 => '198.41.128.0/17',
11 => '162.158.0.0/15',
12 => '104.16.0.0/13',
13 => '104.24.0.0/14',
14 => '172.64.0.0/13',
15 => '131.0.72.0/22',
16 => '[Omitted - My Public IP Address]',
),
'forwarded_for_headers' =>
array (
0 => 'HTTP_X_FORWARDED_FOR',
),
'version' => '30.0.4.1',
'overwrite.cli.url' => 'https://cloud.xylerfox.ca',
'overwritehost' => 'cloud.xylerfox.ca',
'overwriteprotocol' => 'https',
here’s where I’m getting stuck at. With this config, my NextCloud yells at me that the Reverse Proxy isn’t set up properly. It keeps throttling my reverse proxy server.
If I remove my public IP from the trusted proxies, it seems to work, but it registers all incoming IP as my public IP address. Despite me using my internal DNS to bypass going to the Internet, so it should be showing my internal address.
I had this all working before I had to rebuild my entire server. This is the biggest frustrating part. I’m unsure what I’m missing from all this…