Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Nginx #31

Open
NMO13 opened this issue Jul 8, 2021 · 1 comment
Open

Using Nginx #31

NMO13 opened this issue Jul 8, 2021 · 1 comment

Comments

@NMO13
Copy link

NMO13 commented Jul 8, 2021

I want to use this container behind an Nginx server but I am not able to configure Nginx properly.

I have the following server block in Nginx:

      server {
            server_name mydomain.com;

            location /calendar {
            #   proxy_set_header   Host  -; # maybe set host header somehow?
               proxy_pass http://127.0.0.1:90/;
            }



    listen 443 ssl; # managed by Certbot
    ssl_certificate ...
    ssl_certificate_key ...
    include ...
    ssl_dhparam ...

}

and I adapted the docker-compose.yml file in the following way:

version: '3'
services:
  webdav:
    image: bytemark/webdav
    restart: always
    ports:
      - "127.0.0.1:90:80"
    environment:
      AUTH_TYPE: Digest
      USERNAME: alice
      PASSWORD: secret1234
    volumes:
      - data:/var/lib/dav
volumes:
  data:

When I make a request to https://mydomain.com/calendar I always get following error:

webdav_1 | [Thu Jul 08 18:53:16.605133 2021] [auth_digest:error] [pid 38:tid 139699229092584] [client 192.168.176.1:38338] AH01786: uri mismatch - </calendar> does not match request-uri </>, referer: http://mydomain.com/calendar
I suppose it has something to do with the host header bc. Apache seems to get the uri /calendar from it.

@jcormier
Copy link

jcormier commented Apr 7, 2022

Should be able to set LOCATION to /calendar to match proxy location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants