# Docker Nextcloud with Nginx Proxy on Host

**URL:** <https://forums.docker.com/t/docker-nextcloud-with-nginx-proxy-on-host/105385>\
**Category:** Compose\
**Created:** [March 5, 2021, 10:15pm UTC](https://forums.docker.com/t/docker-nextcloud-with-nginx-proxy-on-host/105385 "2021-03-05T22:15:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![peterluitwin](https://avatars.discourse-cdn.com/v4/letter/p/eada6e/32.png) [@peterluitwin](https://forums.docker.com/u/peterluitwin)\
**Post date:** [March 5, 2021, 10:15pm UTC](https://forums.docker.com/t/docker-nextcloud-with-nginx-proxy-on-host/105385/1 "2021-03-05T22:15:42Z")

</div>

Hi there,

got a problem with DNS Resolution it seems.

Got a container with MariaDB  
Got a container with nextcloud app  
Nginx forwards 443 to the nextcloud app

Nextcloud Setup worked with manual set IP address for the DB.

All worked fine on the webinterface, but now i wanted to connect a client app and it requires a authentification - problem is now the url gets changed 3 times to the manual set IP address showed in the browser address bar. I manipulated it then manually and it goes further in the auth process but fails then on the 3rd manual manipulation. Where does this come from?

compose file:

version: ‘3’

volumes:  
nextcloud:  
db:

networks:  
frontend:  
ipam:  
config:  
- subnet: 10.20.0.0/24

services:  
db:  
hostname: mariadb  
image: mariadb  
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW  
restart: always  
volumes:  
- db:/var/lib/mysql  
container\_name: mariadb  
environment:  
- MYSQL\_ROOT\_PASSWORD=xxx  
- MYSQL\_PASSWORD=xxx  
- MYSQL\_DATABASE=nextcloud  
- MYSQL\_USER=nextcloud  
networks:  
frontend:  
ipv4\_address: 10.20.0.10

app:  
hostname: nextcloud  
image: nextcloud  
links:  
- db  
container\_name: nextcloud  
volumes:  
- nextcloud:/var/www/html  
restart: always  
networks:  
frontend:  
ipv4\_address: 10.20.0.20

nginx config file:

user nginx;  
worker\_processes 1;

error\_log /var/log/nginx/error.log warn;  
pid /var/run/nginx.pid;

events {  
worker\_connections 1024;  
}

http {  
include /etc/nginx/mime.types;  
default\_type application/octet-stream;

```
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
                  '$status $body_bytes_sent "$http_referer" '
                  '"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;
#tcp_nopush on;

keepalive_timeout 65;

#gzip on;

```

server  
{  
listen 80;  
listen 443 ssl http2;

```
ssl_certificate /etc/letsencrypt/live/*/fullchain.pem;
ssl_certificate_key	/etc/letsencrypt/live/*/privkey.pem;

ssl_protocols TLSv1.3;

location / {
	proxy_pass http://10.20.0.20/ ;
}

```

}  
}

---

<div class="post-metadata">

**Author:** ![peterluitwin](https://avatars.discourse-cdn.com/v4/letter/p/eada6e/32.png) [@peterluitwin](https://forums.docker.com/u/peterluitwin)\
**Post date:** [March 10, 2021, 1:34pm UTC](https://forums.docker.com/t/docker-nextcloud-with-nginx-proxy-on-host/105385/2 "2021-03-10T13:34:21Z")

</div>

really, nothing?? …
