nginx+wordpress安装SSL实现https访问 Linux

nginx+wordpress安装SSL实现https访问

nginx配置文件修改支持https 将下面的内容放入/usr/local/nginx/conf/vhost/favorbook.com.conf server { listen 80; server_name favorbook.com; return 301 https://$host$request_uri; } server { listen 443 ssl; server_name favorbook.com; ssl_certificate /root/ssl/unified.crt; ssl_certificate_key /root/ssl/my-private-decrypted.key; index index.html index.htm index.php default.html default.htm default.php; root /home/wwwroot/favorbook.com; include wordpress.conf; #error_page 404 /404.html; location ~ [^/].php(/|$) { # comment try_files $uri =404; to enable pathinfo try_files $uri =404; fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_index index.php; include fastcgi.conf; #include pathinfo.conf; } location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$ { expires 30d; } location ~ .*.(js|css)?$ { expires 12h; } access_log /home/wwwlogs/favorbook.com.log access; } wordpress支持https跳转 参考: https://blog.shiniv.com/2014/06/open-http-and-https-in-wordpress/...
阅读全文