[BUG] Unable to use external nginx reverse proxy
wx2020 opened this issue · 4 comments
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
I use linuxserver/docker-nextcloud image in my Unraid. I also use nginx on my Ubuntu server, which opened port 9443. I want to access nginx from the outside through port 9443, and then proxy access to nextcloud, but nginx always lost my port number.
Expected Behavior
Nginx doesn't lost my port number.
Steps To Reproduce
Access my domain to my nextcloud
Environment
- OS: Unraid
- How docker service was installed: Docker-compose
CPU architecture
x86-64
Docker creation
nextcloud:
image: lscr.io/linuxserver/nextcloud:latest
container_name: nextcloud
environment:
- PUID=1000
- PGID=100
volumes:
- /mnt/cache/appdata/nextcloud:/config
- /mnt/user/others/nextcloud:/data
ports:
- 9090:80
restart: unless-stopped
logging:
driver: json-file
options:
max-size: 1m
Container logs
My Outer Nginx config:
location / {
proxy_pass http://192.168.100.100:9090;
proxy_set_header Host $host;
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 $scheme;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_set_header X-Forwarded-Host $http_host;
proxy_buffering off;
}
What configuration do I need to modify?
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.
We do not provide support for reverse proxies other than our own. I believe nextcloud has documentation on how to properly reverse proxy this application. You are welcome to look in our reverse proxy confs https://github.com/linuxserver/reverse-proxy-confs/blob/master/nextcloud.subdomain.conf.sample, note that you'll also need to check the includes within swag, to determine how we handle this.
closing as out of scope.
This issue is locked due to inactivity