A newbie's question: how to use an URL like "http://this.site/here"?

Hello!

I could use a bit help here, because I don’t know what search criteria to use. :flushed_face:

I am running Nginx as a proxy for a DAV service. The main setup looks like this:

server {
if ($host = my.fancy.server) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name my.fancy.server;
return 301 https://$server_name$request_uri;
}

server {
listen 443 ssl;
server_name my.fancy.server;
ssl_certificate /etc/letsencrypt/live/my.fancy.server/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/my.fancy.server/privkey.pem;

location / {
proxy_pass ``http://localhost:5232``;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}

Now I can use the address “https://my.fancy.server” in a CalDAV app and my calendars will be found. Works great! :smiley:

What I want to do now is to change the address that is to be used by CalDAV apps into something like this: “https://my.fancy.server**/dav**”, because later on I want to include some other service on the same machine.

My problem is: I don’t know what this address form is called, so I can’t search for it. Shame on my, I know…

If some one could light a torch for me there, I’d be very thankful!

I can’t say for certain, but the address form you’re looking for is a subdirectory path or a location-based proxy. There’s no special name for it in the context of web server configuration that I know of. You can do this by modifying your NGINX configuration to include the /dav path in the location block. BTW, the trailing slash is important…

I’m not a guru in this space, but hopefully this answers the question. (But I may not have parsed it correctly)

Two possible doc pointers:

1 Like

Bingo! Those two terms are what I was looking for! I feel a bit stupid, but I really couldn’t imagine what term to search for. I already found pages that describe how to realise this.

Many, many thanks for kicking me in the right direction! :smiley: :+1:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.