Spaces:
Runtime error
Runtime error
File size: 682 Bytes
8ca21d7 fdcbc34 34d853a fdcbc34 539a75f 34d853a fdcbc34 539a75f fdcbc34 34d853a fdcbc34 539a75f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | FROM ghcr.io/mhsanaei/3x-ui:latest
# Install Nginx using the Alpine Linux package manager
RUN apk update && apk add nginx
# Configure Nginx to forward port 7860 traffic to the VPN panel port 2053 correctly across all internal interfaces
RUN mkdir -p /run/nginx && \
echo 'server { \n\
listen 7860;\n\
location / { \n\
proxy_pass http://0.0.0; \n\
proxy_set_header Host $host; \n\
proxy_set_header X-Real-IP $remote_addr; \n\
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; \n\
} \n\
}' > /etc/nginx/http.d/default.conf
# Start both the VPN panel and Nginx together
CMD /usr/local/x-ui/x-ui & nginx -g "daemon off;"
|