当前位置:网站首页>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 .
边栏推荐
- [turn to] FPGA interview questions
- Recently, the popular social e-commerce marketing model, blind box e-commerce, how beautiful every second is accurately drained
- MySQL系列之分库分表学习笔记
- RT-Thread 模拟器 simulator LVGL控件:button 按钮事件
- Issues related to C # delegation and events
- Host computer development (Architecture Design of firmware download software)
- Tidb index optimization
- AIO Introduction (VIII)
- That is, after the negative impact of gcat advertising e-commerce, is there no stable advertising e-commerce platform?
- Implementation of fruit mall wholesale platform based on SSM
猜你喜欢

线程池中的 工作线程如何被回收

The new business outlet of beautiful Tiantian second mode will be popular in the Internet e-commerce market

【云原生 | Kubernetes篇】Kubernetes 配置

Br backup test

Raspberry school advanced development - "writing of IO port driver code" includes bus address, physical \u virtual address and bcm2835 chip manual knowledge

不间断管理设计

Xuanwu cloud technology passed the listing hearing: the performance fluctuated significantly, and chenyonghui and other three were the controlling shareholders

Recently, the popular social e-commerce marketing model, blind box e-commerce, how beautiful every second is accurately drained

Will the chain 2+1 model be a new business outlet and a popular Internet e-commerce market?

测试开发程序员,你还在迷茫吗?不能把自己定义为码农......
随机推荐
Sharp weapon tcpdump
[Markov chain Monte Carlo] Markov chain Monte Carlo method sampling prior distribution
汇编语言基础:寄存器和寻址方式
Soup side (8)
我的理财产品显示清算中是什么意思?
FSM state machine
同花顺可以开股票账户吗?安全吗?
10 Honest Facts I Want To Share With All Junior Developers
关于c#委托、事件相关问题
尝试使用RenderDoc查看UE的Shader代码
Tidb server tuning
New Taishan crowdfunding business diversion fission growth model in 2022
RT-Thread 模拟器 simulator LVGL控件:button 按钮样式
Test development programmers, are you still confused? You can't define yourself as a yard farmer
Tidb grafana reverse proxy
Tikv key performance parameters and optimization
FTP_ Manipulate remote files
Tidb implementation plan -- I
Upper computer development (software test of firmware download software)
First day of learning MySQL Basics