当前位置:网站首页>WDCP accesses all paths that do not exist and jumps to the home page without returning 404
WDCP accesses all paths that do not exist and jumps to the home page without returning 404
2022-06-29 06:49:00 【Cold hope】
I haven't noticed before , Use wdcp panel ,nginx engine , If you visit a nonexistent url It will not return 404, But automatically return to the home page , It's a bit of a pit , So we still need to customize one 404 Page
Let's get ready first 404.html File upload to server , Record pwd Look at the absolute path , Then edit nginx Configuration file for , The path is a
vi /www/wdlinux/nginx-1.16.1/conf/vhos/00000.default.conf
The extension of the configuration file is .conf, Of the above path nginx Version and conf The file name changes according to your actual situation , Because I installed 1.16.1 Version of nginx, So the folder name is nginx-1.16.1
server {
listen 80;
root /www/web/default;
...
location ^~ /icy_pocket/ {
proxy_pass http://127.0.0.1:8081;
proxy_set_header Host $host;
}
location ^~ /website/ {
proxy_pass http://127.0.0.1:8081;
proxy_set_header Host $host;
}
# Customize 404 page
location = /404.html {
# Upload 404.html Fill in the file path here
root /www/web/default;
}
...
location / {
# Comment out this line of code
#try_files $uri $uri/ /?$args;
}
}
Remember to restart after saving nginx
/www/wdlinux/nginx-1.16.1/sbin/nginx -t
/www/wdlinux/nginx-1.16.1/sbin/nginx -s reload
边栏推荐
- Li Kou daily question - day 30 -1281 Difference of sum of bit product of integer
- QT (x): control operation
- 力扣每日一题-第30天-1281.整数的各位积和之差
- Rearrangement string of leetcode simple question
- try anbox (by quqi99)
- Antd work item memo w3.0
- Observer mode vs publish subscribe mode
- IDEA常用插件
- Service grid ASM year end summary: how do end users use the service grid?
- Failure: unable to log in to "taxpayer equity platform"
猜你喜欢

Maximum ascending subarray sum of leetcode simple problem

关于 localStorage 的一些高阶用法

Sourcetree remote red exclamation point

Games101 Lecture 10 geometry 1 Notes

Why are keys unordered in golang map

Are there too many programmers in China at present?

MySQL add / delete / modify query SQL statement exercise yyds dry goods inventory

package. Are you familiar with all configuration items and their usage of JSON

Annual inventory review of Alibaba cloud's observable practices in 2021

Hyperledger Fabric 2. X custom smart contract
随机推荐
Fault: NetBt log for id4321
Linux Installation redis
Antd work item memo w3.0
力扣每日一题-第30天-1523.位1的个数
配置Flutter开发环境
I would like to ask what securities dealers recommend? Is it safe to open an account online?
package.json的所有配置项及其用法,你都熟悉么
Venn diagram proportional and color shading with semi transparency
Go compile source code (window environment)
Li Kou daily question - day 30 -1281 Difference of sum of bit product of integer
C language pointer to function
Analysis comp122 the Caesar cipher
Ribbon service invocation and load balancing
Small program large screen adaptation Guide
JDBC | Chapter 6: simple use of database connection pool
Share 10 interview questions related to JS promise
Longest substring between two identical characters of leetcode simple question
Servlet version conflict causes page 404
Illustrate plug-in -- AI plug-in development -- creative plug-in -- astute graphics -- multi axis mirroring function
[deep learning] - maze task learning I (to realize the random movement of agents)