Portál AbcLinuxu, 4. listopadu 2025 17:53
server {
resolver 127.0.0.11 valid=5s ipv6=off;
listen 443 ssl;
server_name example.com;
ssl_certificate /etc/nginx/ssl/live/example.com/cert.pem;
ssl_certificate_key /etc/nginx/ssl/live/example.com/privkey.pem;
location ~ ^/(503.html|404.html)/ {
root /usr/share/nginx/error_pages;
internal;
}
location / {
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_pass http://server:8080/;
proxy_intercept_errors on;
error_page 500 502 503 504 /503.html;
error_page 404 /404.html;
}
}
Řešení dotazu:
location = /404.html {
root /usr/share/nginx/error_pages;
internal;
}
location ~ ^/(503.html|404.html)/ {
location ~ ^/(503.html|404.html) {
sry
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.