server { listen
80; server_name blog.localhost; #绑定域名 index index.htm index.html index.php; #默认文件 root /data/webroot/blog; #网站根目录 location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi_params; } if (-f $request_filename/index.html){ rewrite (.*) $1/index.html break; } if (-f $request_filename/index.php){ rewrite (.*) $1/index.php; } if (!-f $request_filename){ rewrite (.*) /index.php; } access_log /data/logs/access.log; error_log /data/logs/error.log; }
除了首页其他大部分网页404怎么办?
把红色的加载nginx配置中就可以了。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-12
  • 2022-12-23
  • 2021-05-29
  • 2021-12-27
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-27
  • 2021-12-21
  • 2022-02-02
  • 2022-12-23
  • 2022-12-23
  • 2021-05-26
相关资源
相似解决方案