Hi everyone,
I have a weird Caddy Bug while using the popular PHP-MVC-Framework Symfony.
Here is my CaddyFile
censored
{
root /srv/censored/web/
log / stdout
fastcgi / /run/php/php7.0-fpm.sock php {
root /srv/censored/web
}
rewrite {
to {file} /app.php?{query}
}
header / -Server
}
My Log
*.*.*.* - - [13/Aug/2017:21:51:07 +0200] "GET / HTTP/2.0" 200 2173
*.*.*.* - - [13/Aug/2017:21:51:07 +0200] "GET /js/ffdd5a6.js HTTP/2.0" 404 471
*.*.*.* - - [13/Aug/2017:21:51:07 +0200] "GET /css/eb44281.css HTTP/2.0" 404 471
*.*.*.* - - [13/Aug/2017:21:51:08 +0200] "GET /logo.png HTTP/2.0" 304 0
*.*.*.* - - [13/Aug/2017:21:57:07 +0200] "GET / HTTP/2.0" 200 2173
*.*.*.* - - [13/Aug/2017:21:57:07 +0200] "GET /js/ffdd5a6.js HTTP/2.0" 404 471
*.*.*.* - - [13/Aug/2017:21:57:07 +0200] "GET /css/eb44281.css HTTP/2.0" 404 471
*.*.*.* - - [13/Aug/2017:21:57:07 +0200] "GET /logo.png HTTP/2.0" 304 0
And my Tree
web
βββ app_dev.php
βββ apple-touch-icon.png
βββ app.php
βββ bundles
β βββ framework -> ../../vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/public/
β βββ sensiodistribution -> ../../vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/public/
βββ config.php
βββ css
β βββ eb44281.css
β βββ eb44281_semantic_1.css
βββ favicon.ico
βββ js
β βββ ffdd5a6_jquery_1.js
β βββ ffdd5a6.js
β βββ ffdd5a6_semantic.min_2.js
βββ logo.png
βββ robots.txt
βββ themes
βββ default
βββ assets
βββ fonts
β βββ icons.eot
β βββ icons.otf
β βββ icons.svg
β βββ icons.ttf
β βββ icons.woff
β βββ icons.woff2
βββ images
βββ flags.png
Without any reason I get 404 in the css and js directoryβ¦
I also tried:
rewrite {
to {path} {path}/ /app.php?{query}
}
But that result in a 404 for the app.phpβ¦
Also im wondering, why the logo can be loaded and every other file in the web directory but not from the subdirectories (like js/ffdd5a6.js).
Thanks in advance for any help!