1- # This is an example of a configuration file for enabling QUIC and HTTP3 . Further configuration is required.
1+ # This is an example of a configuration file for enabling QUIC, HTTP3 and "A+" SSL tests rating . Further configuration is required.
22worker_processes auto;
33worker_rlimit_nofile 65536;
44pid /tmp/freenginx.pid;
@@ -17,14 +17,24 @@ http {
1717 aio threads;
1818 tcp_nopush on;
1919 tcp_nodelay on;
20- reset_timedout_connection on ;
21- send_timeout 2 ;
22- client_body_timeout 60 ;
23- client_body_buffer_size 10M ;
24- client_max_body_size 10M ;
25- keepalive_timeout 60 ;
20+ reset_timedout_connection off ;
21+ send_timeout 60s ;
22+ client_body_timeout 120s ;
23+ client_body_buffer_size 16M ;
24+ client_max_body_size 20M ;
25+ keepalive_timeout 30s ;
2626 server_tokens off;
2727 types_hash_max_size 4096;
28+ proxy_buffering on;
29+ proxy_buffer_size 32k;
30+ proxy_busy_buffers_size 64k;
31+ proxy_buffers 512 8k;
32+ proxy_max_temp_file_size 0;
33+ proxy_intercept_errors on;
34+ proxy_read_timeout 300s;
35+ proxy_connect_timeout 60s;
36+ proxy_send_timeout 60s;
37+ fastcgi_read_timeout 300s;
2838 http2 on;
2939 http3 on;
3040 ssl_early_data on;
4757 ssl_ocsp on;
4858 ssl_ocsp_cache shared:ocspSSL:60m;
4959 ssl_verify_depth 2;
60+ resolver 1.1.1.1 8.8.8.8 ipv6=off valid=300s;
5061 resolver_timeout 300s;
5162 add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
5263 add_header X-Content-Type-Options nosniff;
@@ -126,45 +137,36 @@ http {
126137 proxy_temp_path /tmp/proxy_temp_path;
127138 fastcgi_temp_path /tmp/fastcgi_temp;
128139
129- proxy_buffering on;
130- proxy_buffer_size 16k;
131- proxy_busy_buffers_size 24k;
132- proxy_buffers 384 4k;
133- proxy_max_temp_file_size 0;
134-
135140 server {
136- listen 8080 default_server fastopen=256;
137- listen [::]:8080 default_server fastopen=256;
138- listen 8443 default_server quic reuseport;
139- listen [::]:8443 default_server quic reuseport;
140- listen 8443 default_server ssl fastopen=256;
141- listen [::]:8443 default_server ssl fastopen=256;
142- server_name test.example.com;
141+ listen 8080 default_server fastopen=256;
142+ listen 8443 default_server quic reuseport;
143+ listen 8443 default_server ssl fastopen=256;
144+ server_name test.example.com;
143145
144- if ($scheme = http) {
145- return 308 https://test.example.com$request_uri;
146- }
147- if ($host = 'www.test.example.com') {
148- rewrite ^/(.*)$ https://test.example.com/$1 permanent;
149- }
150- if ($host != 'test.example.com') {
151- return 308 https://test.example.com$request_uri;
152- }
153- if ($request_method !~ ^(GET|POST|PUT)$) {
154- return '405';
155- }
146+ if ($scheme = http) {
147+ return 308 https://test.example.com$request_uri;
148+ }
149+ if ($host = 'www.test.example.com') {
150+ rewrite ^/(.*)$ https://test.example.com/$1 permanent;
151+ }
152+ if ($host != 'test.example.com') {
153+ return 308 https://test.example.com$request_uri;
154+ }
155+ if ($request_method !~ ^(GET|POST|PUT)$) {
156+ return '405';
157+ }
156158
157- location / {
158- root /var/www/html;
159- index index.html index.htm;
159+ location / {
160+ root /var/www/html;
161+ index index.html index.htm;
160162
161- limit_except GET POST PUT {
162- deny all;
163- }
164- }
163+ limit_except GET POST PUT {
164+ deny all;
165+ }
166+ }
165167
166- location /robots.txt {
167- return 200 "User-agent: *\nDisallow: /\n";
168+ location /robots.txt {
169+ return 200 "User-agent: *\nDisallow: /\n";
170+ }
168171 }
169- }
170172}
0 commit comments