|
@@ -5,10 +5,14 @@ upstream nextjs {
|
|
|
server 127.0.0.1:3000;
|
|
server 127.0.0.1:3000;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+upstream palizvaniback {
|
|
|
|
|
+ server palizvani.hghweb.ir;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
server {
|
|
server {
|
|
|
listen 80 default_server;
|
|
listen 80 default_server;
|
|
|
|
|
|
|
|
- server_name _;
|
|
|
|
|
|
|
+ server_name palizvani.ir www.palizvani.ir ;
|
|
|
|
|
|
|
|
server_tokens off;
|
|
server_tokens off;
|
|
|
|
|
|
|
@@ -22,23 +26,27 @@ server {
|
|
|
proxy_set_header Connection 'upgrade';
|
|
proxy_set_header Connection 'upgrade';
|
|
|
proxy_set_header Host $host;
|
|
proxy_set_header Host $host;
|
|
|
proxy_cache_bypass $http_upgrade;
|
|
proxy_cache_bypass $http_upgrade;
|
|
|
|
|
+#
|
|
|
|
|
+# location /ping {
|
|
|
|
|
+# return 200 'ssl-nginx-PONG!: $http_upgrade';
|
|
|
|
|
+# add_header Content-Type text/plain;
|
|
|
|
|
+# }
|
|
|
|
|
|
|
|
- location /ping {
|
|
|
|
|
- return 200 'ssl-nginx-PONG!: $http_upgrade';
|
|
|
|
|
- add_header Content-Type text/plain;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- # DYNAMIC ASSETS - NO CACHE
|
|
|
|
|
location / {
|
|
location / {
|
|
|
- proxy_pass http://nextjs;
|
|
|
|
|
|
|
+ proxy_pass http://nextjs;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- location ~ ^/api/(.*)$ {
|
|
|
|
|
- proxy_redirect off;
|
|
|
|
|
- proxy_pass_request_headers on;
|
|
|
|
|
- proxy_pass http://palizvani.hghweb.ir/api/$1?$query_string;
|
|
|
|
|
|
|
+ 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 {
|
|
# location /socket.io {
|
|
|
# proxy_redirect off;
|
|
# proxy_redirect off;
|
|
|
# proxy_pass_request_headers on;
|
|
# proxy_pass_request_headers on;
|