added a social share plugin to my website

To allow social share on my websites, I installed a plugin called Ultimate Social Media. It just worked like a charm!

I tried several others but USM seemed to be the most popular one available on the market. Anyhow, the premium plan is not for free!

So far, my website is running smoothly on my vps purchased on vultr. For personal use, I strongly recommend vultr for its easy use and charge by hours. You won’t have to worry about IP block by GFW if your readers are from China. You can easily change your IP and recover your server by building a snapshot which is for free.

Later on, I’ll write a post about how to build a website from scratch. It’ll take some time to write a complete guide.

ps: try my referral if you’re interested in vultr. You’ll get 50$ credit to try the platform. If you have used my link, I’ll be happy to offer unlimited advice to build a website or even vpn!

https://www.vultr.com/?ref=8095480-4F

or

https://www.vultr.com/?ref=8095479

如何使用deneyhosts

参考:

https://www.centos.bz/2017/08/denyhosts-protect-ssh-server/

https://www.cyberciti.biz/faq/linux-unix-delete-remove-ip-address-that-denyhosts-blocked/

有一天ssh时感觉特别慢,然后开始调查日志,发现/var/log/secure里有很多匿名攻击,虽然不至于破解但是给我的服务器增加了很多负担而且长此以往还容易导致服务器提供商封锁服务器.

于是,开始研究如何防止暴力破解和攻击,denyhosts映入眼帘.

http强制定向https

/usr/local/nginx/conf/vhost/*.conf

主要是修改这个文件,实行301定向.

    if ($scheme = http ) {
    return 301 https://$host$request_uri;
    }

最关键的问题是处理好端口监听,因为我需要为SSR设置端口,方便混淆流量,所以设置参数比较复杂.比如,这里我ssl监听端口用的8080而不是443.

server
{
listen 8080 ssl http2;
#listen [::]:443 ssl http2;
server_name geoseis.cn www.geoseis.cn;

记录自己的第一次建站历程

初衷:

本来并没有打算建站,有这个想法是因为想用SSR http-simple混淆增强翻墙的稳定性,思路很简单,就是GFW嗅探时会被引导到我的网页,伪装成正常的网站访问流量.

本来可以用Caddy实现这个功能,忽然脑洞大开想做个自己的网站,索性付诸行动.我的执行力和动手能力很强,即使是开始一个新的篇章.

因为我本来就租了几个vps,所以就没有去寻找web hosting,vps相对web hosting更强大些,当然也更折腾,但是偶不怕折腾.

先评测下vps,谷歌GCE速度最快,当然也最贵;Vultr最近很多IP都是被封的,能找到国内能访问的东京服务器非常不容易,但是好在免费换IP,所以一直在使用.下面这个参考文章写得很好,但是,也有无数坑儿等着你.

vultr务必选择东京服务器,否则速度会很慢,延迟太多.备选硅谷,其实我用过巴黎的服务器也挺稳的.

购买域名

千万不要用godaddy,网站访问有问题,非常难用,经常打不开,墙外也不行.

后来我在腾讯买的域名geoseis.cn,一年几十块钱.腾讯也有免费的域名解析服务,域名解析是建站的第一步,也是我花了很久才弄明白的一件事儿.

安装LNMP环境

新手建议选择nginx,而不是apache,出了问题前者更容易谷歌.

记住,ssl一定要选择,方便https加密访问.我遇到的第二个大坑就是ssl,用的Let’s encrypt免费ssl.

今天终于解决了http强制转向Https访问,前几天太忙了.好不容易设置好了HTTPS访问,但是发现http访问不了,后来发现80端口没有设置好,改了一个conf文件,重启Lnmp一切正常了.

参考:

https://blog.csdn.net/gsls200808/article/details/53425711