heyongzhen

出现404 Not Found的原因是nginx指向页面不存在,编辑nginx配置文件,修改nginx指向页面路径

root html; 修改为 root /usr/share/nginx/html;

index index.html index.htm; 修改为 index index.html index.htm index.php;

[root@bogon /]# vim /etc/nginx/nginx.conf
location / {
    root /usr/share/nginx/html;
    index index.html index.htm index.php;
}
[root@bogon nginx]# service nginx restart

 

分类:

Linux

技术点:

相关文章:

  • 2021-08-14
  • 2021-11-07
  • 2021-12-23
  • 2021-12-11
  • 2021-04-01
  • 2021-09-22
  • 2022-01-02
  • 2021-08-18
猜你喜欢
  • 2021-05-10
  • 2022-01-18
  • 2021-11-18
  • 2021-11-12
  • 2021-12-06
  • 2021-08-19
  • 2021-08-21
相关资源
相似解决方案