当前位置:网站首页>How to solve the 404 problem
How to solve the 404 problem
2022-06-13 07:08:00 【guangsu.】
How to solve the problem in a big way 404
End of configuration vhost.conf after , Access domain name return 404. Check in turn
- selinux Whether to shut down
- Is the domain name path correct
- hostname And ip Whether it corresponds to
There are no problems in these areas , So what should we do ?
nginx The process model of is master-worker
Pattern . from worker Be responsible for specific cgi Request parsing .
[[email protected] public]$>ps aux | grep nginx
root 9977 0.0 0.0 47496 2444 ? Ss 15:13 0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
sujianh+ 19271 0.0 0.0 49584 2732 ? S 20:27 0:00 nginx: worker process
sujianh+ 19992 0.0 0.0 112720 964 pts/0 S+ 20:44 0:00 grep --color=auto nginx
If you can trace worker process load Which file is good , To verify whether the file exists or not , The question is how to track it ?
linux There is a tool on the strace
, System calls initiated by processes can be monitored . in other words , We can see the six basic operations of the operating system . There is a system call stat
, Get the meta information of the file .
So we can monitor this .
Because I only opened one worker process . So only strace One worker Process .
[[email protected] network_security]$>strace -p 19271
strace: Process 19271 attached
epoll_wait(11, [{EPOLLIN, {u32=261448992, u64=94395052680480}}], 512, -1) = 1
accept4(7, {sa_family=AF_INET, sin_port=htons(38612), sin_addr=inet_addr("127.0.0.1")}, [16], SOCK_NONBLOCK) = 4
epoll_ctl(11, EPOLL_CTL_ADD, 4, {EPOLLIN|EPOLLRDHUP|EPOLLET, {u32=261449689, u64=94395052681177}}) = 0
epoll_wait(11, [{EPOLLIN, {u32=261449689, u64=94395052681177}}], 512, 60000) = 1
recvfrom(4, "GET / HTTP/1.1\r\nHost: local.lara"..., 1024, 0, NULL, NULL) = 661
stat("/home/sujianhui/PhpstormProjects/blog/public/", {st_mode=S_IFDIR|0775, st_size=95, ...}) = 0
stat("/home/sujianhui/PhpstormProjects/blog/public/", {st_mode=S_IFDIR|0775, st_size=95, ...}) = 0
stat("/home/sujianhui/PhpstormProjects/blog/public/index.php", {st_mode=S_IFREG|0664, st_size=1731, ...}) = 0
epoll_ctl(11, EPOLL_CTL_MOD, 4, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=261449689, u64=94395052681177}}) = 0
getsockname(4, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("127.0.0.1")}, [16]) = 0
socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = 5
ioctl(5, FIONBIO, [1]) = 0
epoll_ctl(11, EPOLL_CTL_ADD, 5, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=261449457, u64=94395052680945}}) = 0
connect(5, {sa_family=AF_INET, sin_port=htons(9000), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS
epoll_wait(11, [], 512, 60000) = 0
...
...
close(9) = 0
epoll_wait(11, [], 512, 4943) = 0
close(4) = 0
epoll_wait(11, ^Cstrace: Process 19271 detached
<detached ...>
Extract key information
`stat("/home/sujianhui/PhpstormProjects/blog/public/index.php", {st_mode=S_IFREG|0664, st_size=1731, ...}) = 0`
track stat
You can find worker seek /home/sujianhui/PhpstormProjects/blog/public/index.php
. This problem is solved .
Empathy , about 403 This solution can also be followed .
5xx series
5xx A series of problems all appear in php over there . Refer to the following nginx Of error Logs are more reliable than blind guessing .
边栏推荐
- Through the function seaborn cubehelix_ Palette build order palette
- Simple understanding of basic language of C language
- 【马尔科夫链-蒙特卡罗】马尔科夫链-蒙特卡罗方法对先验分布进行抽样
- Tidb data migration (DM) Introduction
- Can flush open a stock account? Is it safe?
- AIO Introduction (VIII)
- NFV基本概述
- 号称下一代监控系统 来看看它有多牛逼
- Raspberry school advanced development - "writing of IO port driver code" includes bus address, physical \u virtual address and bcm2835 chip manual knowledge
- Host computer development (Architecture Design of firmware download software)
猜你喜欢
First day of learning MySQL Basics
Normalizing y-axis in histograms in R ggplot to proportion
Byte (nine)
In the era of membership based social e-commerce, how do businesses build their own private domain traffic pool?
玄武云科技通过上市聆讯:业绩波动明显,陈永辉等三人为控股股东
[RS-422 and RS-485] RS-422 and RS-485 serial interface standard
Nfv basic overview
RT-Thread 模拟器 simulator LVGL控件:switch 开关按钮控件
2022 - 06 - 12: dans un échiquier carré n * N, il y a n * n pièces, donc chaque pièce peut avoir exactement une pièce. Mais maintenant quelques pièces sont rassemblées sur une grille, par exemple: 2 0
Evolution in the digital age
随机推荐
Xuanwu cloud technology passed the listing hearing: the performance fluctuated significantly, and chenyonghui and other three were the controlling shareholders
基于ESP32CAM实现WebSocket服务器实时点灯
杭州证券开户是安全的吗?
RT-Thread 模拟器 simulator LVGL控件:switch 开关按钮控件
[Markov chain Monte Carlo] Markov chain Monte Carlo method sampling prior distribution
Real time lighting of websocket server based on esp32cam
Table access among Oracle database users
The innovative public platoon mode team invites users to split, beautiful every second, and links the 2+1 new business model
牙周炎问题调研(持续进行中)
Priority analysis of list variables in ansible playbook and how to separate and summarize list variables
What does my financial product mean in clearing?
c#高級編程-特性篇
Lightning breakpoint continuation
我的理财产品显示清算中是什么意思?
When the concept of industrial Internet just appeared, people only regarded it as a method to obtain b-end traffic
Normalizing y-axis in histograms in R ggplot to proportion
杭州网上开户是安全的吗?
Upper computer development (code debugging of firmware download software)
基于SSM实现水果商城批发平台
Try to use renderdoc to view the shader code of UE