1. Caddy version (caddy version
):
caddy 2.3.0
2. How I run Caddy:
sytemctl start caddy
a. System environment:
systemd
b. Command:
systemctl reload caddy
systemctl restart caddy
systemctl status caddy
c. Service/unit/compose file:
# caddy.service
#
# For using Caddy with a config file.
#
# Make sure the ExecStart and ExecReload commands are correct
# for your installation.
#
# See https://caddyserver.com/docs/install for instructions.
#
# WARNING: This service does not use the --resume flag, so if you
# use the API to make changes, they will be overwritten by the
# Caddyfile next time the service is restarted. If you intend to
# use Caddy's API to configure it, add the --resume flag to the
# `caddy run` command or use the caddy-api.service file instead.
[Unit]
Description=Caddy
Documentation=https://caddyserver.com/docs/
After=network.target network-online.target
Requires=network-online.target
[Service]
User=caddy
Group=caddy
ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile
ExecReload=/usr/bin/caddy reload --config /etc/caddy/Caddyfile
TimeoutStopSec=5s
LimitNOFILE=1048576
LimitNPROC=512
PrivateTmp=true
ProtectSystem=full
AmbientCapabilities=CAP_NET_BIND_SERVICE
[Install]
WantedBy=multi-user.target
d. My complete Caddyfile or JSON config:
paste config here, replacing this text
use `caddy fmt` to make it readable
DO NOT REDACT anything except credentials
or helpers will be sad
3. The problem I’m having:
Routes are not working, always shows the default route for any url for example /process/hi should display the controller: pages, method: hi but it displays the default route, i think there is maybe something wrong with my try_files but even when i add {query} behind index.php it doesn’t work
4. Error messages and/or full log output:
caddy.service - Caddy
Loaded: loaded (/lib/systemd/system/caddy.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2021-01-31 22:55:42 CET; 1 day 14h ago
Docs: https://caddyserver.com/docs/
Main PID: 60140 (caddy)
Tasks: 11 (limit: 14275)
Memory: 27.8M
CGroup: /system.slice/caddy.service
└─60140 /usr/bin/caddy run --environ --config /etc/caddy/Caddyfile
Feb 02 07:45:42 crazy.fuzion-fq.ru caddy[60140]: {"level":"info","ts":1612248342.4381948,"logger":"tls.cache.maintenance","msg":"certificate expires soon; q>
Feb 02 07:45:42 crazy.fuzion-fq.ru caddy[60140]: {"level":"info","ts":1612248342.43853,"logger":"tls.cache.maintenance","msg":"attempting certificate renewa>
Feb 02 07:45:42 crazy.fuzion-fq.ru caddy[60140]: {"level":"info","ts":1612248342.4396544,"logger":"tls.renew","msg":"acquiring lock","identifier":"45.15.143>
Feb 02 07:45:42 crazy.fuzion-fq.ru caddy[60140]: {"level":"info","ts":1612248342.439948,"logger":"tls.renew","msg":"lock acquired","identifier":"45.15.143.2>
Feb 02 07:45:42 crazy.fuzion-fq.ru caddy[60140]: {"level":"info","ts":1612248342.4405932,"logger":"tls.renew","msg":"renewing certificate","identifier":"45.>
Feb 02 07:45:42 crazy.fuzion-fq.ru caddy[60140]: {"level":"info","ts":1612248342.4430285,"logger":"tls.renew","msg":"certificate renewed successfully","iden>
Feb 02 07:45:42 crazy.fuzion-fq.ru caddy[60140]: {"level":"info","ts":1612248342.4431002,"logger":"tls.renew","msg":"releasing lock","identifier":"45.15.143>
Feb 02 07:45:42 crazy.fuzion-fq.ru caddy[60140]: {"level":"info","ts":1612248342.4432263,"logger":"tls","msg":"reloading managed certificate","identifiers":>
Feb 02 07:45:42 crazy.fuzion-fq.ru caddy[60140]: {"level":"warn","ts":1612248342.4444888,"logger":"tls","msg":"stapling OCSP","error":"no OCSP stapling for >
Feb 02 07:45:42 crazy.fuzion-fq.ru caddy[60140]: {"level":"info","ts":1612248342.444586,"logger":"tls.cache","msg":"replaced certificate in cache","identifi>
~
~
5. What I already tried:
privatedomain.com {
encode zstd gzip
root * /var/www/panels/panel
php_fastcgi unix//run/php/php7.4-fpm.sock
file_server browse
handle /process* {
try_files {path}/ /process/index.php
}
}