1. My Caddy version (caddy version
): 1.0.4
2. How I run Caddy:
a. System environment:
FreeBSD 11.3 jail in FreeNAS 11.3
b. Command:
service caddy start
c. Service/unit/compose file:
#!/bin/sh
#
# PROVIDE: caddy
# REQUIRE: networking
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable caddy:
# caddy_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable caddy
#
# caddy_cert_email (str): Set to "" by default.
# Defines the SSL certificate issuer email. By providing an
# email address you automatically agree to letsencrypt.org's
# general terms and conditions
#
# caddy_bin_path (str): Set to "/usr/local/bin/caddy" by default.
# Provides the path to the caddy server executable
#
# caddy_cpu (str): Set to "99%" by default.
# Configures, how much CPU capacity caddy may gain
#
# caddy_config_path (str): Set to "/usr/local/www/Caddyfile" by default.
# Defines the path for the configuration file caddy will load on boot
#
# caddy_user (str): Set to "root" by default.
# Defines the user that caddy will run on
#
# caddy_group (str): Set to "wheel" by default.
# Defines the group that caddy files will be attached to
#
# caddy_logfile (str) Set to "/var/log/caddy.log" by default.
# Defines where the process log file is written, this is not a web access log
#
# caddy_env (str) Set to "" by default.
# This allows environment variable to be set that may be required, for example when using "DNS Challenge" account credentials are required.
# e.g. (in your rc.conf) caddy_env="CLOUDFLARE_EMAIL=me@domain.com CLOUDFLARE_API_KEY=my_api_key"
#
. /etc/rc.subr
name="caddy"
rcvar="${name}_enable"
load_rc_config ${name}
: ${caddy_enable:="NO"}
: ${caddy_cert_email=""}
: ${caddy_bin_path="/usr/local/bin/caddy"}
: ${caddy_cpu="99%"} # was a bug for me that caused a crash within jails
: ${caddy_config_path="/usr/local/www/Caddyfile"}
: ${caddy_logfile="/var/log/caddy.log"}
: ${caddy_user="root"}
: ${caddy_group="wheel"}
if [ "$caddy_cert_email" = "" ]
then
echo "rc variable \$caddy_cert_email is not set. Please provide a valid SSL certificate issuer email."
exit 1
fi
pidfile="/var/run/${name}.pid"
procname="${caddy_bin_path}" #enabled builtin pid checking for start / stop
command="/usr/sbin/daemon"
command_args="-p ${pidfile} /usr/bin/env ${caddy_env} ${procname} -cpu ${caddy_cpu} -log stdout -conf ${caddy_config_path} -agree -email ${caddy_cert_email} < /dev/null >> ${caddy_logfile} 2>&1"
start_precmd="caddy_startprecmd"
caddy_startprecmd()
{
if [ ! -e "${pidfile}" ]; then
install -o "${caddy_user}" -g "${caddy_group}" "/dev/null" "${pidfile}"
fi
if [ ! -e "${caddy_logfile}" ]; then
install -o "${caddy_user}" -g "${caddy_group}" "/dev/null" "${caddy_logfile}"
fi
}
required_files="${caddy_config_path}"
run_rc_command "$1"
d. My complete Caddyfile or JSON config:
cloud2.familybrown.org 192.168.1.24 {
root /usr/local/www/nextcloud
log /var/log/nextcloud_access.log
errors /var/log/nextcloud_errors.log
tls {
ca https://acme-staging-v02.api.letsencrypt.org/directory
dns cloudflare
}
fastcgi / 127.0.0.1:9000 php {
env PATH /bin
env modHeadersAvailable true
env front_controller_active true
connect_timeout 60s
read_timeout 3600s
send_timeout 300s
}
header / {
Strict-Transport-Security "max-age=15768000;"
X-Content-Type-Options "nosniff"
X-XSS-Protection "1; mode=block"
X-Robots-Tag "none"
X-Download-Options "noopen"
X-Permitted-Cross-Domain-Policies "none"
X-Frame-Options "SAMEORIGIN"
Referrer-Policy "no-referrer"
}
header /core/fonts {
Cache-Control "max-age=604800"
}
# checks for images
rewrite {
ext .png .html .ttf .ico .jpg .jpeg .css .js .woff .woff2 .svg .gif .map
r ^/index.php/.*$
to /{1} /index.php?{query}
}
rewrite {
r ^/\.well-known/host-meta$
to /public.php?service=host-meta&{query}
}
rewrite {
r ^/\.well-known/host-meta\.json$
to /public.php?service=host-meta-json&{query}
}
rewrite {
r ^/\.well-known/webfinger$
to /public.php?service=webfinger&{query}
}
rewrite {
r ^/index.php/.*$
to /index.php?{query}
}
rewrite / {
if {path} not_starts_with /remote.php
if {path} not_starts_with /public.php
ext .png .html .ttf .ico .jpg .jpeg .css .js .woff .woff2 .svg .gif .map .html .ttf
r ^/(.*)$
to /{1} /index.php{uri}
}
rewrite / {
if {path} not /core/img/favicon.ico
if {path} not /core/img/manifest.json
if {path} not_starts_with /remote.php
if {path} not_starts_with /public.php
if {path} not_starts_with /cron.php
if {path} not_starts_with /core/ajax/update.php
if {path} not_starts_with /status.php
if {path} not_starts_with /ocs/v1.php
if {path} not_starts_with /ocs/v2.php
if {path} not /robots.txt
if {path} not_starts_with /updater/
if {path} not_starts_with /ocs-provider/
if {path} not_starts_with /ocm-provider/
if {path} not_starts_with /.well-known/
#if {path} starts_with /settings/help/
to /index.php{uri}
}
# client support (e.g. os x calendar / contacts)
redir /.well-known/carddav /remote.php/carddav 301
redir /.well-known/caldav /remote.php/caldav 301
# remove trailing / as it causes errors with php-fpm
rewrite {
r ^/remote.php/(webdav|caldav|carddav|dav)(\/?)(\/?)$
to /remote.php/{1}
}
rewrite {
r ^/remote.php/(webdav|caldav|carddav|dav)/(.+?)(\/?)(\/?)$
to /remote.php/{1}/{2}
}
rewrite {
r ^/public.php/(dav|webdav|caldav|carddav)(\/?)(\/?)$
to /public.php/{1}
}
rewrite {
r ^/public.php/(dav|webdav|caldav|carddav)/(.+)(\/?)(\/?)$
to /public.php/{1}/{2}
}
# .htaccess / data / config / ... shouldn't be accessible from outside
status 404 {
/.htaccess
/data
/config
/db_structure
/.xml
/README
/3rdparty
/lib
/templates
/occ
/console.php
}
}
3. The problem I’m having:
Under Nextcloud 18.0.4 (and likely earlier versions as well), going under the user menu to Help:
should direct the user to the help screen. What it actually does is send them back into an “embedded” version of the Files screen:
I suspect that it’s a matter of one of the rewrite rules not working properly, but I’m not able to tell where it needs to be fixed. That menu item appears to be a link to /settings/help
.
4. Error messages and/or full log output:
nextcloud_access.log
:
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /settings/help HTTP/2.0" 200 19477
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /css/core/7681-16d0-server.css?v=b92d206521717ac032f8aa58d3c7ff2f-dea4c38d-0 HTTP/2.0" 200 19632
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /apps/files_pdfviewer/css/style.css?v=6a154fe0-0 HTTP/2.0" 200 346
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /css/icons/icons-vars.css?v=1588004931 HTTP/2.0" 200 159431
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /css/core/7681-16d0-css-variables.css?v=b92d206521717ac032f8aa58d3c7ff2f-dea4c38d-0 HTTP/2.0" 200 530
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /css/notifications/783c-16d0-styles.css?v=b92d206521717ac032f8aa58d3c7ff2f-783c3f18-0 HTTP/2.0" 200 903
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /css/settings/47cd-16d0-settings.css?v=b92d206521717ac032f8aa58d3c7ff2f-47cd76e4-0 HTTP/2.0" 200 5952
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /css/core/7681-16d0-results.css?v=b92d206521717ac032f8aa58d3c7ff2f-dea4c38d-0 HTTP/2.0" 200 520
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /apps/theming/styles?v=0 HTTP/2.0" 200 1267
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /apps/encryption/js/encryption.js?v=dea4c38d-0 HTTP/2.0" 200 816
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /core/search/js/search.js?v=dea4c38d-0 HTTP/2.0" 200 5560
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /apps/files_pdfviewer/js/previewplugin.js?v=dea4c38d-0 HTTP/2.0" 200 6000
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /apps/files_sharing/js/dist/main.js?v=dea4c38d-0 HTTP/2.0" 200 2043
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /apps/firstrunwizard/js/about.js?v=dea4c38d-0 HTTP/2.0" 200 492
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /apps/files_videoplayer/js/main.js?v=dea4c38d-0 HTTP/2.0" 200 6350
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /core/js/dist/main.js?v=dea4c38d-0 HTTP/2.0" 200 1364972
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /apps/files_rightclick/js/script.js?v=dea4c38d-0 HTTP/2.0" 200 14871
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /apps/notifications/js/notifications.js?v=dea4c38d-0 HTTP/2.0" 200 186558
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /core/search/js/searchprovider.js?v=dea4c38d-0 HTTP/2.0" 200 12444
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /apps/settings/img/admin.svg?v=dea4c38d HTTP/2.0" 200 236
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /core/js/files/fileinfo.js?v=dea4c38d-0 HTTP/2.0" 200 2142
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /core/js/files/client.js?v=dea4c38d-0 HTTP/2.0" 200 23878
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /apps/settings/img/help.svg?v=dea4c38d HTTP/2.0" 200 519
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /core/img/actions/logout.svg?v=dea4c38d HTTP/2.0" 200 342
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /apps/firstrunwizard/img/info.svg?v=dea4c38d HTTP/2.0" 200 374
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /apps/files/img/app.svg?v=dea4c38d HTTP/2.0" 200 222
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /apps/activity/img/activity.svg?v=dea4c38d HTTP/2.0" 200 217
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /core/doc/user/index.html HTTP/2.0" 301 50
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /apps/photos/img/app.svg?v=dea4c38d HTTP/2.0" 200 493
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /js/core/merged-template-prepend.js?v=dea4c38d-0 HTTP/2.0" 200 2950
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /apps/theming/js/theming?v=0 HTTP/2.0" 200 232
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /apps/accessibility/js/accessibility?v=0 HTTP/2.0" 200 85
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /avatar/fred/32?v=1 HTTP/2.0" 201 225
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /svg/core/logo/logo?color=fff&v=1 HTTP/2.0" 200 321
2020/04/27 12:35:09 192.168.1.199 - - [27/Apr/2020:12:35:09 -0400] "GET /core/doc/user/ HTTP/2.0" 302 0
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/files/ HTTP/2.0" 200 43642
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/notifications/img/notifications-new.svg HTTP/2.0" 200 1059
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/notifications/img/notifications.svg HTTP/2.0" 200 456
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/2.0" 200 74
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/files_rightclick/css/app.css?v=5e585c9e-0 HTTP/2.0" 200 412
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/files_external/css/external.css?v=d16b8f0e-0 HTTP/2.0" 200 144
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/encryption/ajax/getStatus HTTP/2.0" 200 77
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /css/files/9eeb-16d0-merged.css?v=b92d206521717ac032f8aa58d3c7ff2f-9eeb65bb-0 HTTP/2.0" 200 5585
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /css/text/d233-16d0-icons.css?v=b92d206521717ac032f8aa58d3c7ff2f-d233662f-0 HTTP/2.0" 200 417
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /css/files_sharing/c5f2-16d0-icons.css?v=b92d206521717ac032f8aa58d3c7ff2f-c5f24915-0 HTTP/2.0" 200 102
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /css/activity/6c1e-16d0-style.css?v=b92d206521717ac032f8aa58d3c7ff2f-6c1e7ede-0 HTTP/2.0" 200 1109
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /js/files/merged-index.js?v=dea4c38d-0 HTTP/2.0" 200 92694
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/files_sharing/js/dist/collaboration.js?v=dea4c38d-0 HTTP/2.0" 200 1507
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/federatedfilesharing/js/external.js?v=dea4c38d-0 HTTP/2.0" 200 5021
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/files_rightclick/js/files.js?v=dea4c38d-0 HTTP/2.0" 200 4760
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/text/js/files.js?v=dea4c38d-0 HTTP/2.0" 200 196844
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /core/js/dist/systemtags.js?v=dea4c38d-0 HTTP/2.0" 200 21298
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/systemtags/js/systemtags.js?v=dea4c38d-0 HTTP/2.0" 200 12832
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/recommendations/js/main.js?v=dea4c38d-0 HTTP/2.0" 200 94879
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/comments/js/comments.js?v=dea4c38d-0 HTTP/2.0" 200 66919
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/files_versions/js/files_versions.js?v=dea4c38d-0 HTTP/2.0" 200 33431
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/files_sharing/js/dist/additionalScripts.js?v=dea4c38d-0 HTTP/2.0" 200 15466
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/files_sharing/js/dist/files_sharing.js?v=dea4c38d-0 HTTP/2.0" 200 15722
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/files/js/fileinfomodel.js?v=dea4c38d-0 HTTP/2.0" 200 3187
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/files_external/js/app.js?v=dea4c38d-0 HTTP/2.0" 200 3264
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/files_external/js/rollingqueue.js?v=dea4c38d-0 HTTP/2.0" 200 3412
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/files_external/js/mountsfilelist.js?v=dea4c38d-0 HTTP/2.0" 200 3879
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /core/img/actions/delete.svg HTTP/2.0" 200 247
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/files/js/dist/sidebar.js?v=dea4c38d-0 HTTP/2.0" 200 402598
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/files_external/js/statusmanager.js?v=dea4c38d-0 HTTP/2.0" 200 19401
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /js/activity/activity-sidebar.js?v=dea4c38d-0 HTTP/2.0" 200 5559
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/files_external/js/templates.js?v=dea4c38d-0 HTTP/2.0" 200 7967
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/files_sharing/js/dist/files_sharing_tab.js?v=dea4c38d-0 HTTP/2.0" 200 1451103
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/notifications/img/notifications-new.svg HTTP/2.0" 200 1059
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/files_trashbin/js/files_trashbin.js?v=dea4c38d-0 HTTP/2.0" 200 12559
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/viewer/js/viewer.js?v=dea4c38d-0 HTTP/2.0" 200 947765
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/2.0" 200 74
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/encryption/ajax/getStatus HTTP/2.0" 200 77
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /core/img/breadcrumb.svg?v=1 HTTP/2.0" 200 188
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "PROPFIND /remote.php/dav/files/fred/ HTTP/2.0" 207 6806
2020/04/27 12:35:10 192.168.1.199 - - [27/Apr/2020:12:35:10 -0400] "GET /apps/theming/favicon/settings?v=0 HTTP/2.0" 200 0
2020/04/27 12:35:11 192.168.1.199 - - [27/Apr/2020:12:35:11 -0400] "GET /apps/systemtags/lastused HTTP/2.0" 200 2
2020/04/27 12:35:11 192.168.1.199 - - [27/Apr/2020:12:35:11 -0400] "GET /ocs/v2.php/apps/text/workspace?path=%2F HTTP/2.0" 404 142
2020/04/27 12:35:11 192.168.1.199 - - [27/Apr/2020:12:35:11 -0400] "GET /apps/recommendations/api/recommendations HTTP/2.0" 200 1015
2020/04/27 12:35:11 192.168.1.199 - - [27/Apr/2020:12:35:11 -0400] "GET /index.php/apps/files/ajax/getstoragestats.php?dir=%2F HTTP/2.0" 200 228
2020/04/27 12:35:11 192.168.1.199 - - [27/Apr/2020:12:35:11 -0400] "GET /ocs/v1.php/apps/files_external/api/v1/mounts?format=json HTTP/2.0" 200 223
2020/04/27 12:35:11 192.168.1.199 - - [27/Apr/2020:12:35:11 -0400] "GET /apps/theming/img/core/filetypes/image.svg?v=0 HTTP/2.0" 200 352
2020/04/27 12:35:11 192.168.1.199 - - [27/Apr/2020:12:35:11 -0400] "GET /apps/theming/img/core/filetypes/video.svg?v=0 HTTP/2.0" 200 277
2020/04/27 12:35:11 192.168.1.199 - - [27/Apr/2020:12:35:11 -0400] "GET /apps/theming/img/core/filetypes/application-pdf.svg?v=0 HTTP/2.0" 200 1054
2020/04/27 12:35:11 192.168.1.199 - - [27/Apr/2020:12:35:11 -0400] "GET /core/preview?fileId=132&c=671c48a39b12ae31f7988e95d69dce20&x=250&y=250&forceIcon=0 HTTP/2.0" 200 25434
2020/04/27 12:35:11 192.168.1.199 - - [27/Apr/2020:12:35:11 -0400] "GET /apps/theming/img/core/filetypes/folder.svg?v=0 HTTP/2.0" 200 255
2020/04/27 12:35:11 192.168.1.199 - - [27/Apr/2020:12:35:11 -0400] "GET /apps/theming/img/core/filetypes/file.svg?v=0 HTTP/2.0" 200 228
2020/04/27 12:35:11 192.168.1.199 - - [27/Apr/2020:12:35:11 -0400] "GET /core/preview?fileId=140&x=32&y=32 HTTP/2.0" 200 3861
2020/04/27 12:35:11 192.168.1.199 - - [27/Apr/2020:12:35:11 -0400] "GET /core/preview?fileId=139&x=32&y=32 HTTP/2.0" 200 2437
2020/04/27 12:35:11 192.168.1.199 - - [27/Apr/2020:12:35:11 -0400] "GET /core/preview?fileId=141&x=32&y=32 HTTP/2.0" 200 3600
2020/04/27 12:35:11 192.168.1.199 - - [27/Apr/2020:12:35:11 -0400] "GET /core/preview?fileId=142&x=32&y=32 HTTP/2.0" 200 3080
2020/04/27 12:35:11 192.168.1.199 - - [27/Apr/2020:12:35:11 -0400] "GET /apps/theming/img/core/filetypes/folder-external.svg?v=0 HTTP/2.0" 200 508
2020/04/27 12:35:11 192.168.1.199 - - [27/Apr/2020:12:35:11 -0400] "GET /index.php/apps/files_external/userglobalstorages/1?testOnly=false HTTP/2.0" 200 165
nextcloud.log has no contents anywhere close to the time of this request.
5. What I already tried:
Another installation of Nextcloud in a different environment (Linux, Apache, no pretty URLs) works fine–and on that installation, I note that the link went to /index.php/settings/help
. As a result, I thought it might help to edit the large rewrite block in the Caddyfile to have this at the end:
if {path} not_starts_with /ocm-provider/
if {path} not_starts_with /.well-known/
if {path} starts_with /settings/help/
to /index.php{uri}
}
That did not have the desired effect; in fact, it broke the system entirely. I’m not sure where else to look to track down the problem.
6. Links to relevant resources:
The Caddyfile I’m using is this one:
with an added header of:
X-Frame-Options "SAMEORIGIN"
The Nextcloud installation was built using this script I maintain: