Replies: 5 comments 1 reply
-
Hi @core1983! To make the server work exclusively via HTTP protocol, you need to make several changes to the configuration file: # compose.yaml
php:
# ...
environment:
# ...
- SERVER_NAME: ${SERVER_NAME:-localhost}, php:80
+ SERVER_NAME: :80
# ...
- MERCURE_PUBLIC_URL: ${CADDY_MERCURE_PUBLIC_URL:-https://${SERVER_NAME:-localhost}:${HTTPS_PORT:-443}/.well-known/mercure}
+ MERCURE_PUBLIC_URL: ${CADDY_MERCURE_PUBLIC_URL:-http://${SERVER_NAME:-localhost}:${HTTP_PORT:-80}/.well-known/mercure}
# ...
ports:
# HTTP
- target: 80
published: ${HTTP_PORT:-80}
protocol: tcp
- # HTTPS
- - target: 443
- published: ${HTTPS_PORT:-443}
- protocol: tcp
- # HTTP/3
- - target: 443
- published: ${HTTP3_PORT:-443}
- protocol: udp
# ... These edits disable TLS support (only TCP port Then the server can be started with the following command: SERVER_NAME=192.168.XXX.XXX docker compose ... If you plan to use Mercure via HTTP, you will also need to make edits to the Mercure bundle configuration. |
Beta Was this translation helpful? Give feedback.
-
@7-zete-7 thanks for help, but when I don't use mercure at all? |
Beta Was this translation helpful? Give feedback.
-
In this case, these edits will sufficient. Currently, it is not really possible to disable Mercure in standard FrankenPHP images. But you can simply not use it. However, the Mercure configuration for FrankenPHP cannot be deleted because errors will appear (see #702 (comment)). |
Beta Was this translation helpful? Give feedback.
-
@7-zete-7 ok it's working on default port 80 but when i set custom port 88 then its not work:
and:
|
Beta Was this translation helpful? Give feedback.
-
@7-zete-7 thanks for clarification. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have local server in my company with ip 192.168.XXX.XXX how to config caddyfile to run with http?
My compose:
In env i set server_name variable:
Beta Was this translation helpful? Give feedback.
All reactions