1. The problem I’m having:
my laravel css and js wont load, so right now im using docker to server 8.2 php because i want my website to be like myapps.com/apps1 and myapps.com/apps2. The backend now its working thanks to this referece : How to Serve Laravel Application in handle or handle_path directives. But the css itself wont load
2. Error messages and/or full log output:
{"level":"info","ts":1752652503.181024,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
{"level":"warn","ts":1752652503.1860003,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":2}
{"level":"info","ts":1752652503.188823,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
{"level":"warn","ts":1752652503.1892877,"logger":"http.auto_https","msg":"server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server","server_name":"srv0","http_port":80}
{"level":"info","ts":1752652503.189443,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc000231180"}
{"level":"info","ts":1752652503.1919262,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"info","ts":1752652503.1926832,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1752652503.1927147,"msg":"serving initial configuration"}
{"level":"info","ts":1752652503.2061164,"logger":"tls","msg":"cleaning storage unit","storage":"FileStorage:/data/caddy"}
{"level":"info","ts":1752652503.2065887,"logger":"tls","msg":"finished cleaning storage units"}
{"level":"info","ts":1752652659.9934735,"msg":"shutting down apps, then terminating","signal":"SIGTERM"}
{"level":"warn","ts":1752652659.9935555,"msg":"exiting; byeee!! 👋","signal":"SIGTERM"}
{"level":"info","ts":1752652659.9936538,"logger":"http","msg":"servers shutting down with eternal grace period"}
{"level":"info","ts":1752652659.9940386,"logger":"admin","msg":"stopped previous server","address":"localhost:2019"}
{"level":"info","ts":1752652659.9940636,"msg":"shutdown complete","signal":"SIGTERM","exit_code":0}
{"level":"info","ts":1752652660.7892056,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
{"level":"warn","ts":1752652660.7914224,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":2}
{"level":"info","ts":1752652660.7928886,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
{"level":"warn","ts":1752652660.793077,"logger":"http.auto_https","msg":"server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server","server_name":"srv0","http_port":80}
{"level":"info","ts":1752652660.7935114,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc00049e580"}
{"level":"info","ts":1752652660.7943733,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"info","ts":1752652660.7945876,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1752652660.794596,"msg":"serving initial configuration"}
{"level":"warn","ts":1752652660.807542,"logger":"tls","msg":"storage cleaning happened too recently; skipping for now","storage":"FileStorage:/data/caddy","instance":"c5dd1c96-df80-4176-9508-91dac9170135","try_again":1752739060.8075361,"try_again_in":86399.999998922}
{"level":"info","ts":1752652660.8077865,"logger":"tls","msg":"finished cleaning storage units"}
{"level":"info","ts":1752653158.8678677,"msg":"shutting down apps, then terminating","signal":"SIGTERM"}
{"level":"warn","ts":1752653158.8679547,"msg":"exiting; byeee!! 👋","signal":"SIGTERM"}
{"level":"info","ts":1752653158.868036,"logger":"http","msg":"servers shutting down with eternal grace period"}
{"level":"info","ts":1752653158.868388,"logger":"admin","msg":"stopped previous server","address":"localhost:2019"}
{"level":"info","ts":1752653158.8684144,"msg":"shutdown complete","signal":"SIGTERM","exit_code":0}
{"level":"info","ts":1752653159.669056,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
{"level":"warn","ts":1752653159.6753004,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":2}
{"level":"info","ts":1752653159.6783822,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
{"level":"warn","ts":1752653159.6787522,"logger":"http.auto_https","msg":"server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server","server_name":"srv0","http_port":80}
{"level":"info","ts":1752653159.6788764,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc000473c00"}
{"level":"info","ts":1752653159.6811638,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"info","ts":1752653159.6815646,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1752653159.6816103,"msg":"serving initial configuration"}
{"level":"warn","ts":1752653159.6942463,"logger":"tls","msg":"storage cleaning happened too recently; skipping for now","storage":"FileStorage:/data/caddy","instance":"c5dd1c96-df80-4176-9508-91dac9170135","try_again":1752739559.6942415,"try_again_in":86399.999998824}
{"level":"info","ts":1752653159.6944313,"logger":"tls","msg":"finished cleaning storage units"}
{"level":"info","ts":1752654156.4454648,"msg":"shutting down apps, then terminating","signal":"SIGTERM"}
{"level":"warn","ts":1752654156.445547,"msg":"exiting; byeee!! 👋","signal":"SIGTERM"}
{"level":"info","ts":1752654156.4456599,"logger":"http","msg":"servers shutting down with eternal grace period"}
{"level":"info","ts":1752654156.4463975,"logger":"admin","msg":"stopped previous server","address":"localhost:2019"}
{"level":"info","ts":1752654156.446452,"msg":"shutdown complete","signal":"SIGTERM","exit_code":0}
{"level":"info","ts":1752654157.2804794,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
{"level":"warn","ts":1752654157.2855642,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":2}
{"level":"info","ts":1752654157.2881236,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//127.0.0.1:2019","//localhost:2019","//[::1]:2019"]}
{"level":"warn","ts":1752654157.2884905,"logger":"http.auto_https","msg":"server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server","server_name":"srv0","http_port":80}
{"level":"info","ts":1752654157.2888095,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc00053cf80"}
{"level":"info","ts":1752654157.2911682,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"info","ts":1752654157.2914636,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1752654157.291487,"msg":"serving initial configuration"}
{"level":"warn","ts":1752654157.304461,"logger":"tls","msg":"storage cleaning happened too recently; skipping for now","storage":"FileStorage:/data/caddy","instance":"c5dd1c96-df80-4176-9508-91dac9170135","try_again":1752740557.304452,"try_again_in":86399.999998646}
{"level":"info","ts":1752654157.3046436,"logger":"tls","msg":"finished cleaning storage units"}
{"level":"info","ts":1752654545.469599,"msg":"shutting down apps, then terminating","signal":"SIGTERM"}
{"level":"warn","ts":1752654545.4696777,"msg":"exiting; byeee!! 👋","signal":"SIGTERM"}
{"level":"info","ts":1752654545.4697616,"logger":"http","msg":"servers shutting down with eternal grace period"}
{"level":"info","ts":1752654545.4703138,"logger":"admin","msg":"stopped previous server","address":"localhost:2019"}
{"level":"info","ts":1752654545.4703424,"msg":"shutdown complete","signal":"SIGTERM","exit_code":0}
{"level":"info","ts":1752654546.305259,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
{"level":"warn","ts":1752654546.3082163,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":2}
{"level":"info","ts":1752654546.31017,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
{"level":"warn","ts":1752654546.3104467,"logger":"http.auto_https","msg":"server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server","server_name":"srv0","http_port":80}
{"level":"info","ts":1752654546.3107789,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc000479c00"}
{"level":"info","ts":1752654546.3122134,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"info","ts":1752654546.3125226,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1752654546.3125446,"msg":"serving initial configuration"}
{"level":"warn","ts":1752654546.3260145,"logger":"tls","msg":"storage cleaning happened too recently; skipping for now","storage":"FileStorage:/data/caddy","instance":"c5dd1c96-df80-4176-9508-91dac9170135","try_again":1752740946.3260071,"try_again_in":86399.999999117}
{"level":"info","ts":1752654546.326145,"logger":"tls","msg":"finished cleaning storage units"}
{"level":"info","ts":1752655832.6244793,"msg":"shutting down apps, then terminating","signal":"SIGTERM"}
{"level":"warn","ts":1752655832.6245663,"msg":"exiting; byeee!! 👋","signal":"SIGTERM"}
{"level":"info","ts":1752655832.6246305,"logger":"http","msg":"servers shutting down with eternal grace period"}
{"level":"info","ts":1752655832.6250145,"logger":"admin","msg":"stopped previous server","address":"localhost:2019"}
{"level":"info","ts":1752655832.6250417,"msg":"shutdown complete","signal":"SIGTERM","exit_code":0}
{"level":"info","ts":1752655833.4531755,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
{"level":"warn","ts":1752655833.4577258,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":2}
{"level":"info","ts":1752655833.4601886,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//127.0.0.1:2019","//localhost:2019","//[::1]:2019"]}
{"level":"warn","ts":1752655833.460705,"logger":"http.auto_https","msg":"server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server","server_name":"srv0","http_port":80}
{"level":"info","ts":1752655833.4608035,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc00024c800"}
{"level":"info","ts":1752655833.463298,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"info","ts":1752655833.4635196,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1752655833.4635334,"msg":"serving initial configuration"}
{"level":"warn","ts":1752655833.474763,"logger":"tls","msg":"storage cleaning happened too recently; skipping for now","storage":"FileStorage:/data/caddy","instance":"c5dd1c96-df80-4176-9508-91dac9170135","try_again":1752742233.4747603,"try_again_in":86399.999999229}
{"level":"info","ts":1752655833.4749062,"logger":"tls","msg":"finished cleaning storage units"}
{"level":"info","ts":1752656594.8453083,"msg":"shutting down apps, then terminating","signal":"SIGTERM"}
{"level":"warn","ts":1752656594.8454378,"msg":"exiting; byeee!! 👋","signal":"SIGTERM"}
{"level":"info","ts":1752656594.845519,"logger":"http","msg":"servers shutting down with eternal grace period"}
{"level":"info","ts":1752656594.846077,"logger":"admin","msg":"stopped previous server","address":"localhost:2019"}
{"level":"info","ts":1752656594.846108,"msg":"shutdown complete","signal":"SIGTERM","exit_code":0}
{"level":"info","ts":1752656595.6610708,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
{"level":"warn","ts":1752656595.6660266,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":2}
{"level":"info","ts":1752656595.6687346,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
{"level":"warn","ts":1752656595.669195,"logger":"http.auto_https","msg":"server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server","server_name":"srv0","http_port":80}
{"level":"info","ts":1752656595.6693037,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc0000b9380"}
{"level":"info","ts":1752656595.671765,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"info","ts":1752656595.6722252,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1752656595.6722581,"msg":"serving initial configuration"}
{"level":"warn","ts":1752656595.6855888,"logger":"tls","msg":"storage cleaning happened too recently; skipping for now","storage":"FileStorage:/data/caddy","instance":"c5dd1c96-df80-4176-9508-91dac9170135","try_again":1752742995.685583,"try_again_in":86399.999999462}
{"level":"info","ts":1752656595.6857278,"logger":"tls","msg":"finished cleaning storage units"}
{"level":"info","ts":1752657399.8228984,"msg":"shutting down apps, then terminating","signal":"SIGTERM"}
{"level":"warn","ts":1752657399.8229692,"msg":"exiting; byeee!! 👋","signal":"SIGTERM"}
{"level":"info","ts":1752657399.8230276,"logger":"http","msg":"servers shutting down with eternal grace period"}
{"level":"info","ts":1752657399.823321,"logger":"admin","msg":"stopped previous server","address":"localhost:2019"}
{"level":"info","ts":1752657399.823346,"msg":"shutdown complete","signal":"SIGTERM","exit_code":0}
{"level":"info","ts":1752657400.4918702,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
{"level":"warn","ts":1752657400.496528,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":2}
{"level":"info","ts":1752657400.498912,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
{"level":"warn","ts":1752657400.4993427,"logger":"http.auto_https","msg":"server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server","server_name":"srv0","http_port":80}
{"level":"info","ts":1752657400.499464,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc000423c80"}
{"level":"info","ts":1752657400.5018053,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"info","ts":1752657400.5021467,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1752657400.502171,"msg":"serving initial configuration"}
{"level":"warn","ts":1752657400.5097687,"logger":"tls","msg":"storage cleaning happened too recently; skipping for now","storage":"FileStorage:/data/caddy","instance":"c5dd1c96-df80-4176-9508-91dac9170135","try_again":1752743800.5097601,"try_again_in":86399.999998926}
{"level":"info","ts":1752657400.5099945,"logger":"tls","msg":"finished cleaning storage units"}
{"level":"info","ts":1752658394.1786609,"msg":"shutting down apps, then terminating","signal":"SIGTERM"}
{"level":"warn","ts":1752658394.1787372,"msg":"exiting; byeee!! 👋","signal":"SIGTERM"}
{"level":"info","ts":1752658394.1788213,"logger":"http","msg":"servers shutting down with eternal grace period"}
{"level":"info","ts":1752658394.1795802,"logger":"admin","msg":"stopped previous server","address":"localhost:2019"}
{"level":"info","ts":1752658394.1796098,"msg":"shutdown complete","signal":"SIGTERM","exit_code":0}
{"level":"info","ts":1752658395.0723734,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
{"level":"warn","ts":1752658395.076088,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":2}
{"level":"info","ts":1752658395.0790403,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
{"level":"warn","ts":1752658395.079319,"logger":"http.auto_https","msg":"server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server","server_name":"srv0","http_port":80}
{"level":"info","ts":1752658395.0795386,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc000117f00"}
{"level":"info","ts":1752658395.080759,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"info","ts":1752658395.0810034,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1752658395.08102,"msg":"serving initial configuration"}
{"level":"warn","ts":1752658395.0914624,"logger":"tls","msg":"storage cleaning happened too recently; skipping for now","storage":"FileStorage:/data/caddy","instance":"c5dd1c96-df80-4176-9508-91dac9170135","try_again":1752744795.0914547,"try_again_in":86399.999998913}
{"level":"info","ts":1752658395.0916457,"logger":"tls","msg":"finished cleaning storage units"}
{"level":"info","ts":1752665823.7687972,"msg":"shutting down apps, then terminating","signal":"SIGTERM"}
{"level":"warn","ts":1752665823.7688942,"msg":"exiting; byeee!! 👋","signal":"SIGTERM"}
{"level":"info","ts":1752665823.7690094,"logger":"http","msg":"servers shutting down with eternal grace period"}
{"level":"info","ts":1752665823.7695787,"logger":"admin","msg":"stopped previous server","address":"localhost:2019"}
{"level":"info","ts":1752665823.769605,"msg":"shutdown complete","signal":"SIGTERM","exit_code":0}
{"level":"info","ts":1752665824.6010792,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
{"level":"warn","ts":1752665824.6032395,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":2}
{"level":"info","ts":1752665824.6046295,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
{"level":"warn","ts":1752665824.6048133,"logger":"http.auto_https","msg":"server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server","server_name":"srv0","http_port":80}
{"level":"info","ts":1752665824.6053023,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc000543480"}
{"level":"info","ts":1752665824.6062133,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"info","ts":1752665824.606419,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1752665824.606433,"msg":"serving initial configuration"}
{"level":"warn","ts":1752665824.6207614,"logger":"tls","msg":"storage cleaning happened too recently; skipping for now","storage":"FileStorage:/data/caddy","instance":"c5dd1c96-df80-4176-9508-91dac9170135","try_again":1752752224.6207566,"try_again_in":86399.999998752}
{"level":"info","ts":1752665824.6209934,"logger":"tls","msg":"finished cleaning storage units"}
3. Caddy version:
v2.7.6
4. How I installed and ran Caddy:
a. System environment:
OS: Ubuntu 22.04.3 LTS 22.04 Jammy
10.41.0
b. My complete Caddy config:
http://38.47.91.161:80 {
handle_path /fuel* {
root * /var/www/fuel
#try_files {path} /index.php
php_fastcgi php74:9000
file_server
}
handle_path /crs* {
root * /var/www/crs/public
uri strip_prefix /crs
#rewrite * /index.php
#try_files {path} /index.php
#try_files {path} {path}/ /crs/index.php
php_fastcgi php82:9000
file_server
}
}