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 {
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
258260server {
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
You can’t perform that action at this time.
0 commit comments