当前位置:网站首页>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
边栏推荐
- Antd work item memo w3.0
- Li Kou today's question -324 Swing sort II
- jetson tx2
- Exclusive download. Alibaba cloud native brings 10+ technical experts to bring new possibilities of cloud native and cloud future
- 开源二三事|ShardingSphere 与 Database Mesh 之间不得不说的那些事
- Li Kou daily question - day 30 -594 Longest harmonic subsequence
- Observer mode vs publish subscribe mode
- Leetcode simple problem building arrays with stack operation
- Installing modules in pycharm
- 多线程工具类 CompletableFuture
猜你喜欢

Delete tag

What is the "danksharding" of V God Kop on Valentine's day?

Single application and microservice application

2022.02.15 - SX10-31. House raiding III

2022.02.15 - 240. Lucky number in matrix

Design and practice of kubernetes cluster and application monitoring scheme

Test Development - ten years of sharpening one sword (VII) interface test tool postman

RedisTemplate处理hash整数类型的问题解析

Creating a new generation of production and service tools with robot education

配置Flutter开发环境
随机推荐
Hyperledger Fabric 2. X custom smart contract
Leetcode simple problem building arrays with stack operation
Longest substring between two identical characters of leetcode simple question
Delete tag
flutter配置国内镜像,连接真机
Draw smooth curves - methods needed - drawing smooth curves - methods needed
I would like to ask what securities dealers recommend? Is it safe to open an account online?
Character pointer as function parameter
QT (x): packaging and deployment
Go basic data type conversion
json tobean
What are the uses of final?
Linux Installation redis
Monitor employee turnover dynamics. This system makes employees tremble!
Agile invincible event
Ribbon service invocation and load balancing
Test Development - ten years of sharpening one sword (VII) interface test tool postman
Two houses with different colors and the farthest distance
[C language] flexible array
MySQL add / delete / modify query SQL statement exercise yyds dry goods inventory