server {
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name example.com www.example.com;
location /{
try_files $uri $uri/ =404; }
location ~*^/(api|date|user|auth|hello){
proxy_pass http://example.com:3333;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location /{
try_files $uri $uri/ =404;
location /{
try_files $uri $uri/ /index.html;