【发布时间】:2021-07-13 15:19:55
【问题描述】:
我正在尝试为 503 添加自定义错误页面。我将这些行添加到 nginx.conf 文件中的服务器 conf:
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /home/username/sites/myProject/current/errorPages;
internal;
}
当 uwsgi 关闭时它会显示自定义页面,但是这不会显示任何图像。我尝试了许多我能想到的不同配置,但没有运气。如何显示图像文件并为自定义错误页面启用 css?
我将自定义错误页面放入/home/username/sites/myProject/current/errorPages
文件结构为:
errorPages/50x.html
errorPages/50x_files/50x.css
errorPages/50x_files/50x.js
errorPages/50x_files/image.png
【问题讨论】:
-
如何在
50x.html中引用此 CSS/图像?