| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- # Cache zone
- proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=STATIC:10m inactive=7d use_temp_path=off;
- upstream nextjs {
- server 127.0.0.1:3000;
- }
- upstream palizvaniback {
- server shahidpalizvani.ir;
- }
- server {
- listen 80 default_server;
- server_name palizvani.ir www.palizvani.ir ;
- server_tokens off;
- gzip on;
- gzip_proxied any;
- gzip_comp_level 4;
- gzip_types text/css application/javascript image/svg+xml;
- 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 /ping {
- # return 200 'ssl-nginx-PONG!: $http_upgrade';
- # add_header Content-Type text/plain;
- # }
- location / {
- proxy_pass http://nextjs;
- }
- location /api {
- proxy_pass http://palizvaniback/api;
- proxy_set_header Host $host;
- }
- # location ~ ^/api/(.*)$ {
- # proxy_redirect off;
- # proxy_pass_request_headers on;
- # proxy_pass http://palizvani.hghweb.ir/api/$1?$query_string;
- # }
- # location /socket.io {
- # proxy_redirect off;
- # proxy_pass_request_headers on;
- # proxy_set_header Upgrade $http_upgrade;
- # proxy_set_header Connection "upgrade";
- # proxy_pass https://80.210.26.206:501;
- # }
- #
- # location /register-service-worker.js {
- # etag on;
- # expires 600s;
- # add_header Cache-Control "public, no-transform";
- # try_files $uri $uri/ /register-service-worker.js;
- # }
- #
- # location /firebase-messaging-sw.js {
- # etag on;
- # expires 600s;
- # add_header Cache-Control "public, no-transform";
- # try_files $uri $uri/ /firebase-messaging-sw.js;
- # }
- # location ~* \.(js|css)$ {
- # etag on;
- # expires 600s;
- # add_header Cache-Control "public, no-transform";
- # try_files $uri $uri/ /?$query_string;
- # }
- #
- # location ~* \.(ico|woff|woff2|ttf|svg|png|map|eot)$ {
- # etag on;
- # expires 10h;
- # add_header Cache-Control "public, no-transform";
- # try_files $uri $uri/ /?$query_string;
- # }
- }
|