68 lines
2.0 KiB
Plaintext
68 lines
2.0 KiB
Plaintext
upstream ferreirareal_backend {
|
|
server 172.17.0.3:8081;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name ferreirareal.com.br www.ferreirareal.com.br;
|
|
include snippets/acme_challenge.conf;
|
|
location / {
|
|
return 301 https://ferreirareal.com.br$request_uri;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 443 quic;
|
|
listen 443 ssl;
|
|
server_name www.ferreirareal.com.br;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/ferreirareal.com.br-0001/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/ferreirareal.com.br-0001/privkey.pem;
|
|
|
|
include snippets/ssl_params.conf;
|
|
return 301 https://ferreirareal.com.br$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 443 quic reuseport;
|
|
listen 443 ssl;
|
|
server_name ferreirareal.com.br;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/ferreirareal.com.br-0001/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/ferreirareal.com.br-0001/privkey.pem;
|
|
|
|
access_log /var/log/nginx/ferreirareal.com.br.access.log detailed_proxy;
|
|
error_log /var/log/nginx/ferreirareal.com.br.error.log warn;
|
|
|
|
include snippets/ssl_params.conf;
|
|
include snippets/proxy_params.conf;
|
|
include snippets/modsecurity.conf;
|
|
include snippets/well_known.conf;
|
|
include snippets/security_actions.conf;
|
|
proxy_cache dynamic_cache;
|
|
set $upstream_proto http;
|
|
set $upstream_app ferreirareal_backend;
|
|
|
|
location = /Contatos.html {
|
|
proxy_cache_bypass 1;
|
|
proxy_no_cache 1;
|
|
proxy_pass http://ferreirareal_backend;
|
|
}
|
|
|
|
location ~* \.(webp|avif|heic|apng|jpg|jpeg|gif|png|ico|svg|mjs|js|ts|wasm|json|woff2?|ttf|otf|eot|css|less|scss)$ {
|
|
include snippets/cache_optimizer.conf;
|
|
add_header Cache-Control $cache_control_header;
|
|
proxy_cache_valid 200 1d;
|
|
proxy_pass http://ferreirareal_backend;
|
|
limit_req zone=global_limit burst=50 nodelay;
|
|
limit_req zone=punishment_limit burst=5 nodelay;
|
|
access_log off;
|
|
}
|
|
|
|
location / {
|
|
expires 15m;
|
|
proxy_cache_valid 200 15m;
|
|
proxy_pass http://ferreirareal_backend;
|
|
}
|
|
}
|