http {
log_format quic '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" "$http3"';
access_log logs/access.log quic;
server {
# for better compatibility it's recommended
# to use the same port for quic and https
listen 8443 http3 reuseport;
listen 8443 ssl;
ssl_certificate certs/example.com.crt;
ssl_certificate_key certs/example.com.key;
ssl_protocols TLSv1.3;
location / {
# required for browsers to direct them into quic port
add_header Alt-Svc 'h3=":8443"; ma=86400';
}
}
}
version: '3'
services:
mgx:
container_name: mgx
image: hotpot/mgx:h3
restart: always
environment:
- EMAIL=mgl@mgz.email
ports:
- "80:80"
- "443:443"
- "443:443/udp"
volumes:
- mgx-data:/etc/letsencrypt
- $HOME/apps/mgx/conf.d/ssl-conf.d:/config
volumes:
mgx-data: