WordPress配置又拍云CDN

WordPress站点Nginx

如果WordPress后台打开界面混乱,没有CSS或者JS,按照我的方法也可以解决

SSL

不使用Force SSL

image-20250821162125480

Advanced

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
location / {
proxy_set_header X-MyHeader $http_x_my_header;
root /www/wordpress;
index index.html index.php;
try_files $uri $uri/ /index.php?$args;
}


# PHP处理配置
location ~ \.php$ {
proxy_set_header X-MyHeader $http_x_my_header;
fastcgi_pass php:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /var/www/html/wordpress$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}

又拍云CDN配置

源站设置

image-20250821162420074

回源Host可以不设置

全程参数跟随

image-20250821162512655

开启HTTPS

image-20250821162614353

本文章来源于我的博客:https://blog.hikki.site