@@ -25,9 +25,13 @@ http {
25
25
26
26
#access_log logs/access.log main;
27
27
28
- sendfile on ;
28
+ #we dont want to send a static files so we can commnet it (optimization)
29
+ #sendfile on;
29
30
#tcp_nopush on;
30
31
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
+
31
35
#keepalive_timeout 0;
32
36
keepalive_timeout 65 ;
33
37
@@ -39,24 +43,58 @@ http {
39
43
# Required to announce the dead backends
40
44
lua_shared_dict deads 10m ;
41
45
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
+ }
48
60
49
- proxy_read_timeout 30 ;
50
- proxy_connect_timeout 10 ;
51
61
52
62
server {
53
63
listen 80 ;
54
64
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
+
55
97
56
- location / {
57
- resolver 127.0.0.1 ;
58
- include nginx-lua.conf;
59
- }
60
98
61
99
location /hellolua {
62
100
content_by_lua '
0 commit comments