Due to the difficulty of accessing gravatar in China, many bloggers in China cannot use the comment avatar of WordPress properly. Now take conscience cloud generation 1 open Tencent cloud official website, create lightweight application server, here I choose the system is centos, now I choose here is 1H1G

233 ~ ~ LNMP please download from lnmp.org. If there is no response, please download from lnmp.org.

Please enter the SSH terminal yum – y install wget to choose y good installed LNMP wget soft.vpser.net/lnmp/lnmp1…. -co lnmp1.7.tar.gz && tar ZXF lnmp1.7.tar.gz && CD lnmp1.7&&./install.sh (LnMP1.7&&./install.sh) A simple introduction to LNMP (L-Linux n-nginx M-mysql p-php) but here we only need nginx, So the command is installation CD/your installation path Within the installation path. / install. Sh nginx installed nginx after the generation of its file (sample files) # PROXY – START/location ~ *. (PHP asp | | | | JSP cgi aspx) { proxy_pass https://secure.gravatar.com; proxy_set_header Host secure.gravatar.com; proxy_set_header X-Real-IP remote_addr; proxy_set_header X-Forwarded-For proxy_add_x_forwarded_for; proxy_set_header REMOTE-HOST remote_addr; }location /{ proxy_pass secure.gravatar.com; Proxy_set_header Host secure.gravatar.com; proxy_set_header X-Real-IP remoteaddr; ProxysetheaderX – Forwarded – Forremote_addr; proxy_set_header X-Forwarded-For remoteaddr; ProxysetheaderX – Forwarded – Forproxy_add_x_forwarded_for; proxy_set_header REMOTE-HOST remoteaddr; AddheaderX – Cacheremote_addr; add_header X-Cache remoteaddr; AddheaderX – Cacheupstream_cache_status; Restart nginx. Configure the SSL certificate. It is recommended to use the Tencent Cloud lightweight application server to complete this configuration

  1. Here is the pagoda anti-generation method to choose Tencent cloud lightweight application server pagoda mirror

  2. Enter the pagoda and fill in the following information

  3. Apply for SSL

Verification completed, anti – generation success! Finally, I’m going to assume that you already have a gravatar with a domain name of www.example.com. How to change your gravatar to your own (wordpress, Typecho for example).

  1. WordPress login to your background to find the theme – Theme editor to find the fuctions.php (find the following code)

gravatar_cn(url){ gravatar_url = array(‘0.gravatar.com/avatar’,’1.gravatar.com/avatar’,’2.gravatar.com/avatar’,’secure.gravatar.com/avatar’); Return str_replace(gravatarurl,akinaoption(‘ gravatarproxy ‘),gravatar_url, Akina_option (‘ gravatar_proxy), gravatarurl akinaoption (‘ gravatarproxy ‘), url); }if(akina_option(‘gravatar_proxy’)){ add_filter(‘get_avatar_url’, ‘gravatar_cn’, 4); }