upstream expressapp { server 127.0.0.1:3000; keepalive 8; } server { listen 80; server_name logiclabs.icu; root /home/mab/pi/client/dist; access_log /var/log/nginx/httpslocalhost.access.log; error_log /var/log/nginx/httpslocalhost.error.log; location / { autoindex on; #try_files $uri $uri/ /index.html; } location /app { proxy_pass http://127.0.0.1:8444; 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 /api { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://expressapp; proxy_redirect off; } location /solr { proxy_pass http://127.0.0.1:8983; 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; } }