1. The problem I’m having:
I’ve been using Caddy for a bit for localhost development and it’s been fantastic. However, I’ve always used localhost. Now, I want to try out my webapp on mobile. However, it seems that I cannot access the webapp using my PC’s IP address, even from my PC.
2. Error messages and/or full log output:
I'm not too sure what logs to put here, if any.
3. Caddy version:
v2.10.0
4. How I installed and ran Caddy:
a. System environment:
Windows 11, using Docker
Client:
Cloud integration: v1.0.35+desktop.10
Version: 25.0.3
API version: 1.44
Go version: go1.21.6
Git commit: 4debf41
Built: Tue Feb 6 21:13:02 2024
OS/Arch: windows/amd64
Context: default
Server: Docker Desktop 4.27.2 (137060)
Engine:
Version: 25.0.3
API version: 1.44 (minimum version 1.24)
Go version: go1.21.6
Git commit: f417435
Built: Tue Feb 6 21:14:25 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.28
GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bb
runc:
Version: 1.1.12
GitCommit: v1.1.12-0-g51d5e94
docker-init:
Version: 0.19.0
GitCommit: de40ad0
b. Command:
docker compose -f .\docker-compose.dev.yml watch
c. Service/unit/compose file:
services:
# My other apps
caddy:
image: caddy:latest
container_name: caddy
restart: unless-stopped
ports:
- 443:443
networks:
- caddy-network
volumes:
- ./Caddyfile.dev:/etc/caddy/Caddyfile
- caddy-data:/data
- caddy-config:/config
volumes:
caddy-data:
name: caddy-data
caddy-config:
name: caddy-config
networks:
caddy-network:
name: caddy-network
d. My complete Caddy config:
192.168.1.30 being my PC’s IP address
Andapp
being my webapp
localhost:443, 192.168.1.30:443 {
encode
reverse_proxy app:5173
}