location ~* \.(css|js|png|jpg|jpeg|gif|ico|webp|woff2|ttf|otf|eot|svg|pdf|json)$ {
location /test/ {
...
}
location /test2/ {
...
}
}
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name 134.152.12.34;
location / {
try_files $uri $uri/ =404;
}
location /test{
proxy_pass http://127.0.0.1:3000/;
}
location ~* \.(css|js|png|jpg|jpeg|gif|ico|webp)$ {
proxy_pass http://127.0.0.1:3000;
}
location ~* \.(woff2|ttf|otf|eot|svg)$ {
proxy_pass http://127.0.0.1:3000;
}
}
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name 134.152.12.34;
location / {
try_files $uri $uri/ =404;
}
}
location /test {
proxy_pass http://127.0.0.1:3000/;
}
location ~* \.(css|js|png|jpg|jpeg|gif|ico|webp)$ {
proxy_pass http://127.0.0.1:3000;
}
location ~* \.(woff2|ttf|otf|eot|svg)$ {
proxy_pass http://127.0.0.1:3000;
}