|
worker_processes auto; |
|
|
|
events { |
|
worker_connections 1024; |
|
multi_accept on; |
|
} |
|
|
|
http { |
|
include mime.types; |
|
default_type application/octet-stream; |
|
|
|
|
|
sendfile on; |
|
tcp_nopush on; |
|
tcp_nodelay on; |
|
keepalive_timeout 65; |
|
types { |
|
text/html html; |
|
text/css css; |
|
text/xml xml; |
|
image/gif gif; |
|
image/jpeg jpeg jpg; |
|
application/javascript js; |
|
application/json json; |
|
application/xml xml; |
|
application/rss+xml rss; |
|
text/plain txt; |
|
} |
|
|
|
|
|
gzip on; |
|
gzip_comp_level 6; |
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/rss+xml; |
|
gzip_proxied any; |
|
gzip_vary on; |
|
gzip_disable "msie6"; |
|
|
|
server { |
|
listen 7860; |
|
server_name chandima-prabath-nectjs-serve.hf.space; |
|
|
|
location / { |
|
|
|
proxy_pass http://localhost:3000; |
|
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; |
|
|
|
|
|
expires 1d; |
|
add_header Cache-Control "public"; |
|
} |
|
|
|
|
|
error_page 404 /404.html; |
|
location = /404.html { |
|
root /usr/share/nginx/html; |
|
internal; |
|
} |
|
|
|
|
|
error_page 500 502 503 504 /50x.html; |
|
location = /50x.html { |
|
root /usr/share/nginx/html; |
|
internal; |
|
} |
|
|
|
|
|
location ~ /\.(ht|git) { |
|
deny all; |
|
} |
|
} |
|
} |
|
|