3 ms·
How many little web servers work without issue when their root page is loaded from a path other than /?
by jameshart 6mo ago
How many little web servers work without issue when their root page is loaded from a path other than /?
- qurren 6mo agoIf that's your concern you can also do this server { listen 80; server_name "tensorboard.localhost"; location / { proxy_pass http://127.0.0.1:6006; } } server { listen 80; server_name "blog.localhost"; location / { proxy_pass http://127.0.0.1:3000; } } HTTP 1.1 and later will have the browser supply the domain name that was used to access the site, and even though *.localhost all resolve to 127.0.0.1, nginx will pluck out the correct configuration and proxy_pass the correct one.