数据库改图片链接
UPDATE wp_posts SET post_content = replace(post_content, 'http://域名/wp-content/uploads','https://域名/wp-content/uploads');
nginx文件夹放入ssl证书文件
blog.ityoung.tech.key blog.ityoung.tech.pem
编辑conf文件
server
{
listen 80;
listen [::]:80; ## listen for ipv6
root /var/www/html/wordpress;
index index.php index.html index.htm index.nginx-debian.html;
server_name ityoung.tech blog.ityoung.tech;
listen 443 ssl;
server_name blog.ityoung.tech;
ssl_certificate /etc/nginx/ssl/blog.ityoung.tech.pem;
ssl_certificate_key /etc/nginx/ssl/blog.ityoung.tech.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
location /
{
try_files $uri $uri/ =404; }
location ~ .php$
{
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
location ~ /.ht
{
deny all;
}
}
评论前必须登录!
注册