|
1 |
| -server { |
2 |
| - listen 80; |
3 |
| - # listen 443 ssl; |
| 1 | +# Secure default configuration generated by Mozilla SSL Configuration Generator |
| 2 | +# generated 2024-01-21, Mozilla Guideline v5.7, nginx 1.24.0, OpenSSL 3.1.4, intermediate configuration |
| 3 | +# https://ssl-config.mozilla.org/#server=nginx&version=1.24.0&config=intermediate&openssl=3.1.4&guideline=5.7 |
4 | 4 |
|
5 |
| - # ssl_certificate /etc/nginx/ssl/nginx.crt; |
6 |
| - # ssl_certificate_key /etc/nginx/ssl/nginx.key; |
| 5 | +server { |
| 6 | + listen 80 default_server; |
| 7 | + listen [::]:80 default_server; |
7 | 8 |
|
8 |
| - server_name localhost; |
| 9 | + # To Configure SSL, comment all lines within the Non-SSL section and uncomment all lines under the SSL section. |
| 10 | + ######################################## Non-SSL ######################################## |
| 11 | + server_name localhost; |
| 12 | + |
| 13 | + # Increase the client_max_body_size to allow larger file uploads |
| 14 | + # The default limits for image uploads as of 11/22/23 is 20MB/file, and 25MB/request |
| 15 | + client_max_body_size 25M; |
9 | 16 |
|
10 |
| - # Increase the client_max_body_size to allow larger file uploads |
11 |
| - # The default limits for image uploads as of 11/22/23 is 20MB/file, and 25MB/request |
12 |
| - client_max_body_size 25M; |
| 17 | + location /api { |
| 18 | + proxy_pass http://api:3080/api; |
| 19 | + } |
13 | 20 |
|
14 |
| - location /api { |
15 |
| - proxy_pass http://api:3080/api; |
16 |
| - } |
| 21 | + location / { |
| 22 | + proxy_pass http://api:3080; |
| 23 | + } |
17 | 24 |
|
18 |
| - location / { |
19 |
| - proxy_pass http://api:3080; |
20 |
| - } |
| 25 | + ######################################## SSL ######################################## |
| 26 | +# # Redirect all http traffic to https |
| 27 | +# location / { |
| 28 | +# return 301 https://$host$request_uri; |
| 29 | +# } |
21 | 30 | }
|
| 31 | + |
| 32 | +#server { |
| 33 | +# listen 443 ssl http2; |
| 34 | +# listen [::]:443 ssl http2; |
| 35 | + |
| 36 | +# ssl_certificate /etc/nginx/ssl/nginx.crt; |
| 37 | +# ssl_certificate_key /etc/nginx/ssl/nginx.key; |
| 38 | +# ssl_session_timeout 1d; |
| 39 | +# ssl_session_cache shared:MozSSL:10m; # about 40000 sessions |
| 40 | +# ssl_session_tickets off; |
| 41 | + |
| 42 | +# # curl https://ssl-config.mozilla.org/ffdhe2048.txt > /etc/nginx/ssl/dhparam |
| 43 | +# ssl_dhparam /etc/nginx/ssl/dhparam; |
| 44 | + |
| 45 | +# # intermediate configuration |
| 46 | +# ssl_protocols TLSv1.2 TLSv1.3; |
| 47 | +# ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305; |
| 48 | +# ssl_prefer_server_ciphers off; |
| 49 | + |
| 50 | +# # HSTS (ngx_http_headers_module is required) (63072000 seconds) |
| 51 | +# add_header Strict-Transport-Security "max-age=63072000" always; |
| 52 | + |
| 53 | +# # OCSP stapling |
| 54 | +# ssl_stapling on; |
| 55 | +# ssl_stapling_verify on; |
| 56 | + |
| 57 | +# # verify chain of trust of OCSP response using Root CA and Intermediate certs |
| 58 | +# ssl_trusted_certificate /etc/nginx/ssl/ca.crt; |
| 59 | + |
| 60 | +# # replace with the IP address of your resolver |
| 61 | +# resolver 127.0.0.1; |
| 62 | + |
| 63 | +# server_name localhost; |
| 64 | + |
| 65 | +# # Increase the client_max_body_size to allow larger file uploads |
| 66 | +# # The default limits for image uploads as of 11/22/23 is 20MB/file, and 25MB/request |
| 67 | +# client_max_body_size 25M; |
| 68 | + |
| 69 | +# location /api { |
| 70 | +# proxy_pass http://api:3080/api; |
| 71 | +# } |
| 72 | + |
| 73 | +# location / { |
| 74 | +# proxy_pass http://api:3080; |
| 75 | +# } |
| 76 | +#} |
0 commit comments