Update nginx_http.conf (test1)

This commit is contained in:
OnceUponATimeInAmerica 2024-08-27 00:40:30 +03:30 committed by GitHub
parent b5d0b4be65
commit e49a07b8e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,4 @@
# Copy this this to /etc/nginx/http.d # Copy this this to /etc/nginx/http.d
# RUN with nginx -g "daemon off;"
map $http_upgrade $connection_upgrade { map $http_upgrade $connection_upgrade {
default upgrade; default upgrade;
'' close; '' close;
@ -19,50 +18,43 @@ map $http_upgrade $connection_upgrade {
# ------------------------- # -------------------------
server { server {
listen 80 default_server; listen 80 default_server;
# listen 80 default_server so_keepalive=on;
# listen 80; # 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/ { location /test/ {
# return 200 'gangnam style!'; return 200 'gangnam style!';
# # because default content-type is application/octet-stream, # because default content-type is application/octet-stream,
# # browser will offer to "save the file"... # browser will offer to "save the file; so if you want to see reply in browser...
# # if you want to see reply in browser, uncomment next line add_header Content-Type text/plain;
# add_header Content-Type text/plain; }
# }
location /adamson { location /adamson {
proxy_pass http://localhost:7274; proxy_pass http://localhost:7274;
proxy_set_header Host $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;
} }
location /CF { location / {
proxy_pass http://localhost:81; proxy_pass http://localhost:993;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "upgrade"; proxy_set_header Connection $connection_upgrade;
proxy_set_header Connection $connection_upgrade; # ------------------
proxy_set_header Host $host; # 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-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 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;
# }}
# -------------------------