Skip to content

Commit 4666e7e

Browse files
committed
Clarify how to edit hosts for each OS
1 parent 67a20d4 commit 4666e7e

2 files changed

Lines changed: 16 additions & 9 deletions

File tree

CLAUDE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@ A Caddy-based reverse proxy for local development with automatic SSL certificate
1616

1717
```bash
1818
# Generate certificates (first time only)
19-
docker-compose --profile setup run --rm mkcert
19+
docker compose --profile setup run --rm mkcert
2020

2121
# Start the proxy
22-
docker-compose up -d --build
22+
docker compose up -d --build
2323

2424
# View logs
25-
docker-compose logs -f caddy
25+
docker compose logs -f caddy
2626

2727
# Stop the proxy
28-
docker-compose down
28+
docker compose down
2929

3030
# Regenerate certificates
31-
rm -rf certs/* && docker-compose --profile setup run --rm mkcert
31+
rm -rf certs/* && docker compose --profile setup run --rm mkcert
3232

3333
# Install CA on macOS
3434
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ./certs/${DOMAIN}.rootCA.pem

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,25 @@ A Dockerized Caddy reverse proxy with automatic SSL certificate generation for l
1818
UPSTREAM_URL=http://host.docker.internal:3000
1919
```
2020

21-
`UPSTREAM_URL` must include the scheme and port.
21+
> [!WARNING]
22+
> `UPSTREAM_URL` must include the scheme and port.
2223
23-
2. Add to `/etc/hosts`:
24+
2. Add your domain to the hosts file:
2425

26+
**macOS/Linux:** Edit `/etc/hosts`
27+
```bash
28+
sudo sh -c 'echo "127.0.0.1 local.example.com" >> /etc/hosts'
2529
```
26-
127.0.0.1 local.example.com
30+
31+
**Windows (PowerShell as Administrator):** Edit `C:\Windows\System32\drivers\etc\hosts`
32+
```powershell
33+
Add-Content -Path C:\Windows\System32\drivers\etc\hosts -Value "127.0.0.1 local.example.com"
2734
```
2835

2936
3. Generate certificates (first time only):
3037

3138
```bash
32-
docker-compose --profile setup run --rm mkcert
39+
docker compose --profile setup run --rm mkcert
3340
```
3441

3542
4. Install the CA certificate (one-time):

0 commit comments

Comments
 (0)