Problem with docker image with SSL certificate. #1854
-
|
I have this {
auto_https off
admin localhost:2019
https_port 8443
frankenphp {
worker ./web/index.php
}
}
localhost {
tls ./web/ssl/localhost.pem ./web/ssl/localhost-key.pem
log
encode zstd br gzip
root ./web
request_header X-Sendfile-Type x-accel-redirect
request_header X-Accel-Mapping ../private-files=/private-files
intercept {
@sendfile header X-Accel-Redirect *
handle_response @sendfile {
root private-files/
rewrite * {resp.header.X-Accel-Redirect}
method * GET
header -X-Accel-Redirect
file_server
}
}
php_server {
try_files {path} index.php
}
}It works but it doesn't recognize my SSL certificates. docker run \
-e FRANKENPHP_CONFIG="worker ./web/index.php" \
-e SERVER_NAME="https://localhost:8443"
-v $PWD/Caddyfile:/etc/caddy/Caddyfile \
-v $PWD:/app \
-p 8443:8443 \
--name yii2-frankenphp-worker \
dunglas/frankenphpThks, |
Beta Was this translation helpful? Give feedback.
Answered by
terabytesoftw
Sep 2, 2025
Replies: 1 comment
-
|
I solved it this way, another way would be to overwrite the FrankenPHP docker run \
-e FRANKENPHP_CONFIG="worker ./web/index.php" \
-e SERVER_NAME="https://localhost:8443" \
-e CADDY_GLOBAL_OPTIONS=$'auto_https off\nhttps_port 8443' \
-e CADDY_SERVER_EXTRA_DIRECTIVES="tls /app/web/ssl/localhost.pem /app/web/ssl/localhost-key.pem" \
-v $PWD:/app \
-p 8443:8443 \
--name yii2-frankenphp-worker \
dunglas/frankenphp |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
terabytesoftw
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I solved it this way, another way would be to overwrite the FrankenPHP
Caddyfile, but i prefer to do it with environment variables without expecting secondary results.