File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -252,11 +252,13 @@ server {
252
252
}
253
253
```
254
254
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.
256
258
257
259
``` nginx
258
260
server {
259
- listen 8080 ;
261
+ listen 8081 ;
260
262
server_name localhost;
261
263
262
264
# Redirect root
@@ -272,7 +274,8 @@ server {
272
274
# Strip /codimd and forward
273
275
location /codimd/ {
274
276
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
276
279
proxy_set_header Host $host;
277
280
proxy_set_header X-Real-IP $remote_addr;
278
281
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -282,6 +285,8 @@ server {
282
285
}
283
286
```
284
287
288
+ ** Start with:** ` ./start-nginx-experiment.sh ` (uses ` docker run ` , works on macOS)
289
+
285
290
---
286
291
287
292
## Conclusion
You can’t perform that action at this time.
0 commit comments