Support intro
Sorry to hear you’re facing problems. 
The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.
If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.
Getting help
In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.
Before clicking submit: Please check if your query is already addressed via the following resources:
- Official documentation (searchable and regularly updated)
- How to topics and FAQs
- Forum search
(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).
Experiencing an issue where Nextcloud AIO returns 404 through a reverse proxy while direct access with the same headers works perfectly.
Nextcloud Server version: Latest (via AIO)
Operating system and version: Nextcloud AIO on Unraid
Web server and version: Apache 2.4.65 (included with AIO), Caddy (included with AIO)
Reverse proxy and version: Pangolin 1.12.2 (custom reverse proxy on separate VM)
PHP version: Included with AIO
Is this the first time you’ve seen this error? No - it worked previously and then started failing
When did this problem seem to first start? Issue appears spontaneously after working correctly for extended periods
Installation method: AIO (All-in-One)
Are you using Cloudflare, mod_security, or similar? No
Summary of the issue
Nextcloud AIO is properly configured with reverse proxy mode enabled and domain set correctly. Direct access to the Apache port (11000) with the exact headers that the reverse proxy should be sending works perfectly. However, accessing through the reverse proxy returns 404 Not Found.
Important: Other services on the same Unraid server, proxied through the same reverse proxy, work correctly. Only Nextcloud returns 404.
Steps to replicate
- Configure Nextcloud AIO with reverse proxy mode enabled
- Set domain in AIO Master
- Configure reverse proxy to forward to Apache port 11000 with proper headers
- Access through reverse proxy - returns 404 Not Found
- Access directly with curl using same headers - works correctly
Testing Performed
Direct access to Apache port with proper headers (successful):
curl -v -H “Host: nextcloud.example.com”
-H “X-Forwarded-For: 203.0.113.1”
-H “X-Forwarded-Proto: https”
-H “X-Forwarded-Host: nextcloud.example.com”
http://192.168.1.100:11000
Response:
HTTP/1.1 302 Found
Location: https://nextcloud.example.com/login
Via: 1.1 Caddy
Set-Cookie: oc_sessionPassphrase=…; path=/; secure; HttpOnly; SameSite=Lax
Strict-Transport-Security: max-age=31536000;
This proves:
- Nextcloud is running correctly
- Apache is accessible on port 11000
- Headers are being accepted properly
- Domain is correctly configured
- SSL redirect works
Through reverse proxy: 404 Not Found (no entries in Nextcloud logs)
Configuration
Nextcloud AIO Master settings:
- Domain:
nextcloud.example.com(properly configured) - Reverse Proxy Mode: Enabled
- Apache Port: 11000
Reverse proxy configuration:
- Target:
http://192.168.1.100:11000 - Headers being forwarded:
X-Forwarded-Proto: https
X-Forwarded-Host:nextcloud.example.com
X-Forwarded-For: client-ip - SSL termination: At reverse proxy
- Other services on same backend: Working correctly
Log entries
Nextcloud AIO Apache logs
[Fri Nov 21 16:05:43] [mpm_event:notice] [pid 42:tid 42] AH00489: Apache/2.4.65 (Unix) configured – resuming normal operations
[Fri Nov 21 16:05:43] [core:notice] [pid 42:tid 42] AH00094: Command line: ‘/usr/local/apache2/bin/httpd -D FOREGROUND’
Important: No entries appear in Apache logs when accessing through reverse proxy (despite 404 being returned). This suggests requests may not be reaching Nextcloud at all.
Nextcloud container startup logs
Connection to nextcloud-aio-apache (172.18.0.8) 11000 port \[tcp/\*\] succeeded!
System config value trusted_domains => 1 set to string nextcloud.example.com
System config value overwrite.cli.url set to string https://nextcloud.example.com/
System config value trusted_proxies => 10 set to string 172.18.0.0/16
All configuration appears correct.
Nextcloud config.php (relevant sections)
‘trusted_domains’ => [
0 => ‘localhost’,
1 => 'nextcloud.example.com',
],
‘trusted_proxies’ => [
0 => ‘127.0.0.1’,
1 => ‘::1’,
10 => ‘172.18.0.0/16’,
],
‘overwrite.cli.url’ => ‘'https://nextcloud.example.com/’`,
Browser shows: “404 Not Found”
No console errors, no network errors - just a plain 404 response.
Key observations:
- Direct curl with identical headers works perfectly
- Access through reverse proxy returns 404
- Other services on same backend through same reverse proxy work
- No entries in Nextcloud/Apache logs when accessing through proxy
- Complete reinstall temporarily fixes issue, but it returns after hours
If headers were wrong, direct curl wouldn’t work. If reverse proxy mode was disabled, direct curl wouldn’t work. If domain was misconfigured, direct curl wouldn’t work. But direct curl does work with the exact headers the proxy sends.
Why would Nextcloud return 404 through a reverse proxy when:
- Direct access with same headers works perfectly?
- Reverse proxy mode is enabled?
- Domain is properly configured?
- trusted_proxies includes relevant networks?
- Most importantly: Apache logs show no requests arriving when accessed through proxy?
Could there be some Nextcloud/Caddy internal routing or validation that rejects requests based on something other than headers? Some kind of connection validation that works for direct connections but fails for proxied ones?