1. Caddy version (
2. How I run Caddy:
Basically, with the command line. It has been installed with apt.
a. System environment:
I am on Debian 8.11 (Jessie).
d. My complete Caddyfile or JSON config:
root * /xxxxxxx/xxxxxx/public
encode gzip zstd
3. The problem I’m having:
I am having exactly the same problem as this ticket : https://caddy.community/t/caddy2-symfony/6978.
I do not understand why, but my Symfony website is a white page. Every page I try to launch is a white blank page. Does anyone knows why ? I really have the same problem as this ticket…
5. What I already tried:
I have been searching for some working Caddyfiles for Symfony on Github and Google, and tried them, but they didn’t worked.
Also, if I add
file_server in the configuration, like in some others Caddyfiles, I got a 404 error.
And if I remove
zstd, it doesn’t change anything.
For your information, Symfony is in version 4.4.
Thanks by advance for the help !
The blank page is typically because Caddy didn’t actually handle the request, and therefore serves an empty 200 response. This is because you didn’t have a
file_server directive, so it falls through.
If you get a 404 when you add
file_server, then it’s probably because Caddy couldn’t read your files. When running as a systemd service, Caddy runs as the
caddy user, so you need to make sure that user has permissions to see your site’s files.
I’d strongly recommend upgrading to a newer version of PHP. Version 7.0 has no longer been supported for over two years now:
Thank you @francislavoie !
This helped me a lot. The
caddy user could not read my files, that was why I did not see anything when I added
file_server. And thanks for the explanation for why I needed to add file_server !
And for the PHP version, yes, don’t worry : I was just testing Caddy on an old machine that is no longer up to date, to understand the configurations, etc. Then I will test it in preprod, where all my versions are up to date Then in prod, where everything is up to date too. I was just lazy to update PHP on this old test machine that doesn’t support the latest PHP versions
Thanks a lot for the help !!
This topic was automatically closed after 30 days. New replies are no longer allowed.