parent
b44dd7ab89
commit
ba9feb4815
@ -0,0 +1,75 @@ |
||||
events { |
||||
worker_connections 768; |
||||
} |
||||
|
||||
http { |
||||
client_max_body_size 100M; |
||||
# set REMOTE_ADDR from any internal proxies |
||||
# see http://nginx.org/en/docs/http/ngx_http_realip_module.html |
||||
set_real_ip_from 127.0.0.1; |
||||
set_real_ip_from 10.0.0.0/8; |
||||
real_ip_header X-Forwarded-For; |
||||
real_ip_recursive on; |
||||
|
||||
server { |
||||
listen 8006; |
||||
server_name example.org; |
||||
|
||||
location '/.well-known/acme-challenge' { |
||||
default_type "text/plain"; |
||||
root /tmp/letsencrypt; |
||||
} |
||||
|
||||
location / { |
||||
if ($request_method = GET) { |
||||
rewrite ^ https://$host$request_uri? permanent; |
||||
} |
||||
return 405; |
||||
} |
||||
} |
||||
|
||||
server { |
||||
listen 4448 ssl http2; |
||||
server_name example.org; |
||||
|
||||
ssl_protocols TLSv1.2 TLSv1.3; |
||||
ssl_ciphers HIGH:!MEDIUM:!LOW:!aNULL:!NULL:!SHA; |
||||
ssl_prefer_server_ciphers on; |
||||
ssl_session_cache shared:SSL:10m; |
||||
|
||||
ssl_certificate /etc/letsencrypt/live/example.org/fullchain.pem; |
||||
ssl_certificate_key /etc/letsencrypt/live/example.org/privkey.pem; |
||||
|
||||
gzip on; |
||||
gzip_types |
||||
application/javascript |
||||
application/x-javascript |
||||
application/json |
||||
application/rss+xml |
||||
application/xml |
||||
image/svg+xml |
||||
image/x-icon |
||||
application/vnd.ms-fontobject |
||||
application/font-sfnt |
||||
text/css |
||||
text/plain; |
||||
gzip_min_length 256; |
||||
gzip_comp_level 5; |
||||
gzip_vary on; |
||||
|
||||
proxy_set_header Host $http_host; |
||||
proxy_set_header X-Forwarded-Proto $scheme; |
||||
proxy_set_header X-Forwarded-For $remote_addr; |
||||
proxy_redirect off; |
||||
|
||||
#location ~ ^/(css|img|js|fonts)/ { |
||||
# root /var/www/html/static; |
||||
# include /etc/nginx/mime.types; |
||||
#} |
||||
|
||||
location / { |
||||
proxy_pass http://server:5000; |
||||
} |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue