发现问题:
wordpress首页,点开文章链接,返回404年,无法查看
引用>
解决方案:
1。修改配置文件
vim/etc/nginx/nginx.conf
<代码>服务器{ 听80; server_name www.ca.com; access_log/var/log/nginx/access.日志主要; 位置/{ 根/usr/share/nginx/html; 指数指数。php指数。html你; #添加这一段 如果(- f request_filename美元/index . html) { 重写(. *)1美元/索引。html打破; } 如果(- f request_filename美元/index . php) { 重写(. *)1美元/index . php; } 如果(!- f request_filename美元){ 重写(. *)/index . php; } } 重写/wp-admin $ $方案://主机uri美元/永久; #到这位置 ~ \位置。php $ { 根/www/数据/xxx; fastcgi_pass 127.0.0.1:9000; fastcgi_index index . php。 fastcgi_param SCRIPT_FILENAME document_root fastcgi_script_name美元; 包括fastcgi_params; } }代码>2。重启服务
systemctl重启nginx 引用>
3。网页验证:解决问题
wordpress配置固定链接nginx访问404问题解决方