diff --git a/nginx_http.conf b/nginx_http.conf index 0b3b20fb..f563b410 100644 --- a/nginx_http.conf +++ b/nginx_http.conf @@ -1,5 +1,4 @@ # Copy this this to /etc/nginx/http.d -# RUN with nginx -g "daemon off;" map $http_upgrade $connection_upgrade { default upgrade; '' close; @@ -19,50 +18,43 @@ map $http_upgrade $connection_upgrade { # ------------------------- server { listen 80 default_server; + # listen 80 default_server so_keepalive=on; # listen 80; - # server_name irarvnseamznew-29b13b6202-home.apps.ir-thr-ba1.arvancaas.ir; + # server_name xxx.arvancaas.ir; + client_header_timeout 1071906480m; + keepalive_timeout 1071906480m; - # location /gg/ { - # return 200 'gangnam style!'; - # # because default content-type is application/octet-stream, - # # browser will offer to "save the file"... - # # if you want to see reply in browser, uncomment next line - # add_header Content-Type text/plain; - # } + location /test/ { + return 200 'gangnam style!'; + # because default content-type is application/octet-stream, + # browser will offer to "save the file; so if you want to see reply in browser... + add_header Content-Type text/plain; + } location /adamson { proxy_pass http://localhost:7274; proxy_set_header Host $host; - # proxy_set_header X-Real-IP $remote_addr; - # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - # proxy_set_header X-Forwarded-Proto $scheme; } - - location /CF { - proxy_pass http://localhost:81; + + location / { + proxy_pass http://localhost:993; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; - # proxy_set_header Connection "upgrade"; - proxy_set_header Connection $connection_upgrade; - proxy_set_header Host $host; + proxy_set_header Connection $connection_upgrade; + # ------------------ + # BUG This line is IMPORTANT! Without it, iran_node's (docker@arvan) dokodemo forwaring to + # foreign_node's authentication_inbound, will not work! + proxy_set_header Host ""; + # proxy_hide_header Host; + # proxy_set_header Host $host; + # ------------------ proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - } + proxy_set_header X-Forwarded-Proto $scheme; + + # proxy_read_timeout 300s; + # proxy_connect_timeout 75s; + client_body_timeout 1071906480m; + client_max_body_size 0; + } } - -# ------------------------- -# This is a DEFAULT site configuration which will simply return 404, preventing -# chance access to any other virtualhost. -# server { -# listen 80 default_server; -# listen [::]:80 default_server; -# # Everything is a 404 -# location / { -# return 404; -# } -# # You may need this to prevent return 404 recursion. -# location = /404.html { -# internal; -# }} -# ------------------------- \ No newline at end of file