Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to configure Let's Encrypt for both example.fr and www.example.fr ? #802

Unanswered
MatthieuLeVerger asked this question in Q&A
Discussion options

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!

You must be logged in to vote

Replies: 1 comment

Comment options

yes!

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /