TMD真的是累死我了,各种BUG,草!
建站教程:https://blog.csdn.net/qq_41765918/article/details/129578971
瞎鸡儿修改wordpress后台导致无法访问。。修复:https://zhuanlan.zhihu.com/p/352331235
全站迁移,使用Duplicator,教程:https://zhuanlan.zhihu.com/p/349069036
理论上按照上面两个,控制好版本问题,只差ssl证书,只需要修改nginx的配置文件如下:
server {
listen 80;
server_name localhost;
#access_log /var/log/nginx/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.php index.htm index.html;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script_name;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
server {
listen 443 ssl;
#access_log /var/log/nginx/host.access1.log main;
server_name www.jensenwei.cn;
ssl_certificate /etc/nginx/cert/scs1709615750193_www.jensenwei.cn_server.crt;
ssl_certificate_key /etc/nginx/cert/scs1709615750193_www.jensenwei.cn_server.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
location / {
root /usr/share/nginx/html;
index index.php index.htm index.html;
}
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script_name;
include fastcgi_params;
}
}
主要关注后面的这个443端口内容,照抄就可以。
后续问题待补充~