Comments (6)
The last time I've updated the nginx conf(~two months ago) I had no such error, this is basically a copy-paste config with minor edits from my own production environment and it's known to work without any issues.
Are you sure you're using fresh example provided ? There's a chance we can solve this together, but I would need more info on that error and your environment.
from docker.
The Apache image has a means of auto configuring things so that the Nextcloud trusted proxy configuration is unnecessary in some types of environments (see https://github.com/nextcloud/docker?tab=readme-ov-file#using-the-apache-image-behind-a-reverse-proxy-and-auto-configure-server-host-and-protocol)
The fpm images do not have this ability.
You'll have to follow the standard Nextcloud Server config process (https://docs.nextcloud.com) for the reverse proxy stuff. Though you may be able to utilize the image's TRUSTED_PROXIES
and OVERWRITE*
environment parameter support to do most/all of it at deployment time.
My take regarding those examples: They are sort of a "best effort" thing and everyone has their own idea about what should be in them. There's been debate about removing some of them in the past, in part because it's challenging (for those of us that try to help out with this repository) to keep them up-to-date and troubleshoot all the variations since we don't necessarily individually use all those third-party image combinations. Ultimately the images in this repository are meant to be used by people that understand Docker and the various components well enough that the examples are more a rough base to start from. There are other deployment modes (and Docker images) for Nextcloud that are meant to be more turnkey. (That's just my perspective, don't take that as anything official).
from docker.
Hello! I fixed the same problem using .examples/docker-compose/with-nginx-proxy/mariadb/fpm by adding the IP address of the Docker network gateway like this:
app:
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html:z
- data:/var/www/html/data:z
environment:
- MYSQL_HOST=db
- REDIS_HOST=redis
- TRUSTED_PROXIES=172.17.0.1
env_file:
- db.env
depends_on:
- db
- redis
from docker.
Note that I have not modified the setup, this appears using the basic configuration presented in the example here!
from docker.
@tzerber much appreciated, I'm running on a raspberry pi 4b, with the nextcloud version & docker container SHA as in the 1st post. The exact error reads like this:
There are some errors regarding your setup.
The reverse proxy header configuration is incorrect. This is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud. For more details see the documentation ↗.
@joshtrichards and @Deniero , thank you for the hint. Running docker inspect
on the network ID of nextcloud_default
, I find
[...]
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.18.0.0/16",
"Gateway": "172.18.0.1"
}
]
},
so I consequently used 172.18.0.1 in the TRUSTED_PROXIES
environment variable just like @Deniero indicated.
This did resolve the issue, thank you very much!
from docker.
@tzerber much appreciated, I'm running on a raspberry pi 4b, with the nextcloud version & docker container SHA as in the 1st post. The exact error reads like this:
There are some errors regarding your setup.
The reverse proxy header configuration is incorrect. This is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud. For more details see the documentation ↗.@joshtrichards and @Deniero , thank you for the hint. Running
docker inspect
on the network ID ofnextcloud_default
, I find[...]
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.18.0.0/16",
"Gateway": "172.18.0.1"
}
]
},so I consequently used 172.18.0.1 in the
TRUSTED_PROXIES
environment variable just like @Deniero indicated.This did resolve the issue, thank you very much!
I believe you just temporary fixed it, that IP (the whole subnet actually) can change in the future unless you specifically declared it in your compose file. I did however notice an error in the example compose file that i will propose a fix once i test to confirm it. In the meantime - make sure you have the app container and the web container in the same docker network, i.e. add this to the app service in the compose file:
networks:
- proxy-tier #or whatever your network is called
from docker.
Related Issues (20)
- WARN[0000] docker-compose.yml: `version` is obsolete HOT 1
- docker-compose command deprecated, docker-compose up -d fails for Redis container; must first use docker-compose down HOT 1
- Add static, or immutable, image tags that always point to the same image build HOT 15
- new env for auto configuration via environment variables for ldapUserCleanupInterval HOT 1
- Error occurred while checking server setup HOT 2
- Docs and examples update, again HOT 5
- Unable to connect ANY clients to NEXTCLOUD behind NGINX Reverse Proxy HOT 6
- PHP-FPM UID + GID incompatible with Nginx UID + GID HOT 1
- Failed upgrade from 28.0.3.2 to 29.0.0.19, stuck in restart loop. HOT 2
- arm64/v8 non-existant? HOT 4
- trusted_proxies setting fails because of reverse-proxy.config.php HOT 7
- nextcloud:28.0.5-fpm-alpine image for arm64 has wrong architecture inside HOT 1
- Infinite loading Nextcloud iOS app HOT 1
- Infinite loading with iOS Nextcloud App HOT 1
- Checksetup request timed out - increase timeout fix it HOT 3
- 28.0.3.2 → 29.0.0.19: issues about .htaccess and .well-known HOT 16
- Cron runs for a time then stops (kuma docker with nextcloud docker) HOT 3
- Nextcloud 28 alpine image - permission denied when post-installation hook is invoked HOT 5
- `TRUSTED_PROXIES` doesn't evaluate `gethostbyname` HOT 1
- Error about docker-compose deploying Redis services HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker.