Our web server is not properly set up to resolve "/.well-known/caldav"

Check Edit for most up to date info

I’ve been looking through the threads and I found this one: [solved] .well-known/caldav check in 15.0.4 nextcloud sever is behind an HAproxy where SSL-offloading is being performed

In the process of getting some information about what I had changed in my nginx/sites-enabled/cloud.jackalope.tech file I realized that a I had a more fleshed out version of my conf file in nginx/con.d/nextcloud.conf

Does this mean I need to symlink the cloud.jackalope.tech file to the nextcloud.conf maybe?

EDIT:

I have tried symlinking cloud.jackalope.tech to nextcloud.conf and that didn’t fix anything.

I then went in and replaced the instances of $scheme and $host with a hardcoded version of the url in case that was the problem (since that seems to be the primary problem in the threads I’ve looked at)

This did not work.

For the sake of information here is my nextcloud.conf file:

server {
	listen 80 default_server;
	server_name cloud.jackalope.tech;
	#Your DDNS adress, (e.g. from desec.io or no-ip.com)
	location ^~ /.well-known/acme-challenge {
		proxy_pass http://127.0.0.1:81;
	}
	location / {
		return 301 https://$host$request_uri;
	}
}
server {
	listen 443 ssl http2 default_server;
	server_name cloud.jackalope.tech;
	root /var/www/nextcloud/;
	access_log /var/log/nginx/nextcloud.access.log main;
	error_log /var/log/nginx/nextcloud.error.log warn;
	location = /robots.txt {
		allow all;
		log_not_found off;
		access_log off;
	}
	location = /.well-known/carddav {
		return 301 https://cloud.jackalope.tech/remote.php/dav;
	}
	location = /.well-known/caldav {
		return 301 https://cloud.jackalope.tech/remote.php/dav;
	}
	client_max_body_size 10240M;
# BEGIN ANSIBLE MANAGED BLOCK collabra
location ^~ /loleaflet {
proxy_pass https://localhost:9980;
proxy_set_header Host $http_host;
}
location ^~ /hosting/discovery {
proxy_pass https://localhost:9980;
proxy_set_header Host $http_host;
}
location ^~ /lool {
proxy_pass https://localhost:9980;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
# END ANSIBLE MANAGED BLOCK collabra
	location / {
		rewrite ^ /index.php$uri;
	}
	location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
		deny all;
	}
	location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
		deny all;
	}
	location ~* \.(?:flv|mp4|mov|m4a)$ {
		mp4;
		mp4_buffer_size 5m;
		mp4_max_buffer_size 10m;
		fastcgi_split_path_info ^(.+\.php)(/.*)$;
		include fastcgi_params;
		include php_optimization.conf;
		fastcgi_pass php-handler;
		fastcgi_param HTTPS on;
	}
	location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+)\.php(?:$|/) {
		fastcgi_split_path_info ^(.+\.php)(/.*)$;
		include fastcgi_params;
		include php_optimization.conf;
		fastcgi_pass php-handler;
		fastcgi_param HTTPS on;
	}
	location ~ ^/(?:updater|ocs-provider)(?:$|/) {
		try_files $uri/ =404;
		index index.php;
	}
	location ~ \.(?:css|js|woff|svg|gif)$ {
		try_files $uri /index.php$uri$is_args$args;
		add_header Cache-Control "public, max-age=15778463";
		access_log off;
		expires 30d;
	}
	location ~ \.(?:png|html|ttf|ico|jpg|jpeg)$ {
		try_files $uri /index.php$uri$is_args$args;
		access_log off;
		expires 30d;
	}
}

Also I tried curling the urls to see what info I could glean from that and this is what I got:

└─➤ curl https://cloud.jackalope.tech/remote.php/dav
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\NotAuthenticated</s:exception>
  <s:message>No public access to this resource., No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured, No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured, No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured</s:message>
</d:error>

and

└─➤ curl http://cloud.jackalope.tech/remote.php/dav 
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>

Any clue what needs to be done here?