Nextcloud docker with nginx on host

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 26.0.0
Operating system and version (eg, Ubuntu 20.04): debian 11
Apache or nginx version (eg, Apache 2.4.25): Apache
PHP version (eg, 7.4): replace me

The issue you are facing:
After installing Nextcloud docker apache instance I want to configure external nginx proxy on host to route to nextcloud docker.
Nextcloud in docker is running fine on port 8088 (unencrypted). Nginx conf is like follows:

server {
    listen              80 http2;
    listen              [::]:80 http2;
    #i have the correct domain on the configs
    server_name         test.floeser.org;
    root /var/www/html;

    index index.php index.html /index.php$request_uri;

    location / {
      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_pass          http://127.0.0.1:8088/;
      proxy_read_timeout  36000s;
      client_max_body_size 0;
    }
}

Trying to access the Nextcloud docker will result in downloading a file and not showing up Nextcloud page.

Is this the first time you’ve seen this error? (Y/N):
Y - initial install

Ok, find out the issue … I had to remove “http2” from nginx config.

You should mark that as solution, btw.