Skip to content

Commit d8918a3

Browse files
committed
docs: Update comparison with working Nginx setup
1 parent 348773c commit d8918a3

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

APPROACH_COMPARISON.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,11 +252,13 @@ server {
252252
}
253253
```
254254

255-
### Approach 2: Nginx with Path Stripping
255+
### Approach 2: Nginx with Path Stripping ✅
256+
257+
**Status: WORKING!** Use the provided `start-nginx-experiment.sh` script.
256258

257259
```nginx
258260
server {
259-
listen 8080;
261+
listen 8081;
260262
server_name localhost;
261263
262264
# Redirect root
@@ -272,7 +274,8 @@ server {
272274
# Strip /codimd and forward
273275
location /codimd/ {
274276
rewrite ^/codimd/(.*)$ /$1 break;
275-
proxy_pass http://localhost:3000;
277+
proxy_pass http://host.docker.internal:3000; # For Docker
278+
# proxy_pass http://localhost:3000; # For bare metal
276279
proxy_set_header Host $host;
277280
proxy_set_header X-Real-IP $remote_addr;
278281
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -282,6 +285,8 @@ server {
282285
}
283286
```
284287

288+
**Start with:** `./start-nginx-experiment.sh` (uses `docker run`, works on macOS)
289+
285290
---
286291

287292
## Conclusion

0 commit comments

Comments
 (0)