2024-08-25 09:40:38 +00:00
|
|
|
# Copy this this to /etc/nginx/http.d
|
|
|
|
map $http_upgrade $connection_upgrade {
|
|
|
|
default upgrade;
|
|
|
|
'' close;
|
|
|
|
}
|
|
|
|
|
|
|
|
# -------------------------
|
|
|
|
# log_format custom '< $remote_addr | $time_local | '
|
|
|
|
# '$request | $status | $body_bytes_sent | '
|
|
|
|
# '$http_user_agent | '
|
|
|
|
# '$http_x_forwarded_for | '
|
|
|
|
# '$proxy_add_x_forwarded_for | $scheme | '
|
|
|
|
# '$http_host | $http_upgrade | $http_connection >';
|
|
|
|
# access_log /var/log/nginx/all.log custom;
|
|
|
|
# # error_log /var/log/nginx/all.log;
|
|
|
|
# error_log /var/log/nginx/all.log debug;
|
|
|
|
|
|
|
|
# -------------------------
|
|
|
|
server {
|
|
|
|
listen 80 default_server;
|
2024-08-26 21:10:30 +00:00
|
|
|
# listen 80 default_server so_keepalive=on;
|
2024-08-25 09:40:38 +00:00
|
|
|
# listen 80;
|
2024-08-26 21:10:30 +00:00
|
|
|
# server_name xxx.arvancaas.ir;
|
|
|
|
client_header_timeout 1071906480m;
|
|
|
|
keepalive_timeout 1071906480m;
|
2024-08-25 09:40:38 +00:00
|
|
|
|
2024-08-26 21:10:30 +00:00
|
|
|
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;
|
|
|
|
}
|
2024-08-25 09:40:38 +00:00
|
|
|
|
|
|
|
location /adamson {
|
|
|
|
proxy_pass http://localhost:7274;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
}
|
2024-08-26 21:10:30 +00:00
|
|
|
|
|
|
|
location / {
|
|
|
|
proxy_pass http://localhost:993;
|
2024-08-25 09:40:38 +00:00
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
2024-08-26 21:10:30 +00:00
|
|
|
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;
|
|
|
|
# ------------------
|
2024-08-25 09:40:38 +00:00
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
2024-08-26 21:10:30 +00:00
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
|
|
|
|
# proxy_read_timeout 300s;
|
|
|
|
# proxy_connect_timeout 75s;
|
|
|
|
client_body_timeout 1071906480m;
|
|
|
|
client_max_body_size 0;
|
|
|
|
}
|
2024-08-25 09:40:38 +00:00
|
|
|
}
|