@@ -25,9 +25,13 @@ http {
2525
2626 #access_log logs/access.log main;
2727
28- sendfile on;
28+ #we dont want to send a static files so we can commnet it (optimization)
29+ #sendfile on;
2930 #tcp_nopush on;
3031
32+ # don't buffer data-sends (disable Nagle algorithm). Good for sending frequent small bursts of data in real time.
33+ #tcp_nodelay on;
34+
3135 #keepalive_timeout 0;
3236 keepalive_timeout 65 ;
3337
@@ -39,24 +43,58 @@ http {
3943 # Required to announce the dead backends
4044 lua_shared_dict deads 10m ;
4145
42- proxy_set_header Host $http_host ;
43- proxy_set_header X-Forwarded-Port $server_port ;
44- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
45- proxy_set_header X-Forwarded-Proto $scheme ;
46- proxy_set_header X-Forwarded-Protocol $scheme ;
47- proxy_set_header X-Real-IP $remote_addr ;
46+ #proxy_set_header Host $http_host;
47+ #proxy_set_header X-Forwarded-Port $server_port;
48+ #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
49+ #proxy_set_header X-Forwarded-Proto $scheme;
50+ #proxy_set_header X-Forwarded-Protocol $scheme;
51+ #proxy_set_header X-Real-IP $remote_addr;
52+
53+ #proxy_read_timeout 30;
54+ #proxy_connect_timeout 10;
55+
56+ map $http_upgrade $connection_upgrade {
57+ default upgrade;
58+ '' close;
59+ }
4860
49- proxy_read_timeout 30 ;
50- proxy_connect_timeout 10 ;
5161
5262 server {
5363 listen 80 ;
5464 server_name localhost;
65+ client_max_body_size 20M ;
66+ proxy_connect_timeout 7d ;
67+ proxy_send_timeout 7d ;
68+ proxy_read_timeout 7d ;
69+
70+ #albo
71+ #websocket_connect_timeout ######;
72+ #websocket_send_timeout #####;
73+ #websocket_read_timeout #####;
74+
75+
76+ # location / {
77+ # resolver 127.0.0.1;
78+ # include nginx-lua.conf;
79+ # }
80+
81+ location / {
82+
83+ resolver 127.0.0.1 ;
84+ proxy_http_version 1.1;
85+ proxy_set_header X-Real-IP $remote_addr ;
86+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
87+ proxy_set_header X-NginX-Proxy true;
88+ proxy_set_header Host $http_host ;
89+ proxy_set_header Upgrade $http_upgrade ;
90+ proxy_set_header Connection $connection_upgrade ;
91+ proxy_redirect off;
92+
93+ include nginx-lua.conf;
94+
95+ }
96+
5597
56- location / {
57- resolver 127.0.0.1 ;
58- include nginx-lua.conf;
59- }
6098
6199 location /hellolua {
62100 content_by_lua '
0 commit comments