nginx serve static html for root and proxy everything else

use the error_page 404 to redirect the traffic

1
2
3
4
5
6
7
8
9
10
11
server {
listen 80;
server_name www.website.com;
access_log off;

error_page 404 = @fallback;

location @fallback {
proxy_pass http://127.0.0.1:8000;
}
}
#

Comments

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×