I need run Kafka on docker with web UI on some specific domain AND LINK, for example:
http://somesite.com/kafka
I am using this docker-compose.yml.
version: '3.3'
services:
zookeeper:
image: 'bitnami/zookeeper:latest'
ports:
- '2181:2181'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
image: 'bitnami/kafka:latest'
ports:
- '9092:9092'
environment:
- KAFKA_BROKER_ID=1
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
depends_on:
- zookeeper
kafka-ui:
image: 'provectuslabs/kafka-ui:latest'
environment:
- KAFKA_CLUSTERS_0_NAME=local
- KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=kafka:9092
- KAFKA_CLUSTERS_0_ZOOKEEPER=zookeeper:2181
depends_on:
- kafka
networks:
- default
ports:
- '9099:8080'
When I set apache2
by direct domain kafka.somesite.com
, it is working.
<VirtualHost *:80>
ServerName kafka.somesite.com
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:9099/
ProxyPassReverse / http://127.0.0.1:9099/
</VirtualHost>
But when I try set domain with the link somesite.com/kafka
, there is only blank screen.
<VirtualHost *:80>
ServerName somesite.com
ProxyPreserveHost On
ProxyPass /kafka http://127.0.0.1:9099/
ProxyPassReverse /kafka http://127.0.0.1:9099/
</VirtualHost>
How can I make Kafka functional with link?
Thank you.