-
-
Couldn't load subscription status.
- Fork 865
How to configure Let's Encrypt for both example.fr and www.example.fr ? #802
-
Hello everyone,
I have successfully put my Symfony project online using Docker, FrankenPHP, and Caddy, following the official documentation. The site is working perfectly with example.fr, but www.example.fr does not work.
In my DNS zone, I have already added an A record for www.example.fr pointing to my server.
For deployment, I use the following command:
SERVER_NAME=example.fr \
APP_SECRET=... \
CADDY_MERCURE_JWT_SECRET=... \
POSTGRES_PASSWORD=... \
POSTGRES_USER=... \
POSTGRES_DB=... \
docker compose -f compose.yaml -f compose.prod.yaml up --wait -d
I don't know how to pass two domain names to the SERVER_NAME variable so that Let's Encrypt works for both example.fr and www.example.fr.
Would replacing the variable with
SERVER_NAME="example.fr, www.example.fr"
allow both domains to be managed by Caddy/FrankenPHP and have SSL certificates for both?
Or is there another syntax or configuration that I need to use to make the site accessible on both addresses?
Thank you in advance for your help and advice!
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
yes!
Beta Was this translation helpful? Give feedback.