Wordpress与Nginx代理传递未加载资源

Wordpress与Nginx代理传递未加载资源,wordpress,nginx,server,Wordpress,Nginx,Server,我刚从blog.example.com迁移到www.example.com/blog,并在我的nginx上添加了以下配置: location ~ /blog(/.*) { proxy_pass http://public-ip; #server IP where the wordpress installed proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forw

我刚从blog.example.com迁移到www.example.com/blog,并在我的nginx上添加了以下配置:

location ~ /blog(/.*) {
 proxy_pass http://public-ip; #server IP where the wordpress installed
 proxy_set_header X-Real-IP $remote_addr;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
然后我将wordpress地址(URL)和站点地址(URL)的wordpress设置从blog.example.com更改为www.example.com/blog

当我查看www.example.com/blog时,post列表、post视图和分页效果良好。但是资源(css、js和图像)根本没有加载

请注意,我的nginx服务器用于我的web应用程序(www.example.com)和另一台服务器中的wordpress应用程序(blog)的负载平衡器

nginx配置或wordpress设置中是否缺少某些内容


非常感谢

可能重复感谢您的参考。情况有点不同。但是我尝试了答案,仍然没有成功:)这可能是博客服务器的配置。突然间,你在
/blog
下寻找css和img。它正在查找WP index.php,因为这是使漂亮的URL正常工作的默认值。可能重复感谢您的参考。情况有点不同。但是我尝试了答案,仍然没有成功:)这可能是博客服务器的配置。突然间,你在
/blog
下寻找css和img。它正在查找WP index.php,因为这是使漂亮URL正常工作的默认值。