It’s done in the reverse proxy, it does not seem to be causing problems so I deleted it to be under the 32k limit.
server {
listen 80;
server_name *.example.org example.org;
access_log /var/log/nginx/example_http.access.log;
error_log /var/log/nginx/example_http.error.log;
return 302 https://$host$request_uri;
}
An example of the log for that when I go to example.org:80/nextcloud :
==> /var/log/nginx/example_redirect.access.log <==
192.168.168.1 - - [17/Jan/2021:14:32:01 -0500] "GET /nextcloud/login HTTP/2.0" 302 145 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0"
==> /var/log/nginx/example_new.access.log <==
192.168.168.1 - - [17/Jan/2021:14:32:01 -0500] "GET /nextcloud/login HTTP/2.0" 200 5932 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0"
==> /var/log/nginx/example_http.access.log <==
192.168.168.1 - - [17/Jan/2021:14:32:10 -0500] "GET /nextcloud/login HTTP/1.1" 302 145 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0"
==> /var/log/nginx/example_redirect.access.log <==
192.168.168.1 - - [17/Jan/2021:14:32:10 -0500] "GET /nextcloud/login HTTP/2.0" 302 145 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0"
==> /var/log/nginx/example_new.access.log <==
192.168.168.1 - - [17/Jan/2021:14:32:10 -0500] "GET /nextcloud/login HTTP/2.0" 200 5928 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0"