nginx cannot display styles and pictures after mounting the maintenance page
my settings are as follows. After setting up, visit http://127.0.0.1:81 and http://127.0.0.1:81/aa(aa can be any value) you can display pictures and other styles. However, the picture cannot be displayed after visiting http://127.0.0.1:81/aa/ and the next layer address, please correct it, thank you!
location / {
root /apps/nginx/html;
try_files $uri $uri/ /maintain.html;
index maintain.html;
}
root / apps/nginx/html;
if you directly use the following configuration, access to all addresses cannot display pictures and styles, but can only access maintain.html,
.root / apps/nginx/html;
rewrite ^ (. *) $/ pages/maintain.html break;
the file directory structure is as follows:
[root@cntl632 ~]-sharp tree / apps/nginx/html/
/ apps/nginx/html/
thank you assets
do you want to imgs?
do you want to know more about favicon.ico
?do you want to know more about logo.png
?do you want to know more about outofservice.png
?do you want to javascripts?
do you want to know more about app.js
?do you want to know more about vendor.js
?do you want to know more about view
?do you want to know more about static.js
?do you want to styles?
do you want to iconfont?
do you want to know more about AmwayMing.TTF
?do you want to main.min.css?
thank you maintain.html