LKS.tw

Hello World Developer

Category: 學習筆記

  • 如何在HestiaCP上安裝和配置Rclone

    你可以先試試看有沒有rclone,據說HestiaCP現在會自動幫你安裝。如果沒有的話,可以切到root手動安裝一下。 然後使用rclone config把要使用的drive給配置一下,畢竟每個drive的差異還是蠻大的,我這邊就不贅述了。 最後就把HestiaCP把Backup的設定改一下,修改的位置如下: 填寫完成後,可以嘗試一下備份。等一段時間備份完成後,你就可以看到備份同時有rclone和local了。

  • 使用timedatectl更改時區

    傳統上我們都是直接修改/etc/localtime來挑戰linux的時區,但其實現在有更簡單的方法可以進行時區調整,也就是標題中提到的timedatectl。

  • 解決使用Cloudflare CDN後IP地址錯誤問題

    最近發現Wordpress comments的ip地址顯示的是內網IP(10.0.0.X),仔細想了一下應該是使用了Cloudflare CDN,但使用者的IP沒有正常獲取的問題。 解決方法也很簡單,直接在wp-config.php裡面加一段code就可以了。

  • Cloudflare 301 Redirect

    最近換了新的domain name,所以就有了做301 Redirect的需求。其實之前就有用Cloudflare做Redirect的經驗,不過基本上也忘得差不多了,導致這次諸多波折,所以還是做一下記錄,也希望可以幫助到有需要的人。 當然一開始打算嘗試使用Page Rules,但搞了好久也沒成功,最後只好放棄改用以前用過的Worker。 Worker是Cloudflare提供的一種 Serverless Edge Computing的解決方案,讓我們可以直接在Cloudflare的節點上執行JavaScript或WebAssembly程式碼,Redirect 就是其中一種合適的輕量化應用。 方法如下: 301 Redirect的範例code如下:

  • HestiaCP 421 misdirected request

    安裝完HestiaCP沒兩天就發現網站掛了 出現421 misdirected request 想說到底怎麼了 google了一下發現原來是Apache更新之後造成的問題 詳情可參考下列網址: https://forum.hestiacp.com/t/nginx-apache-ssl-421-misdirected-request/19502/5 我是直接在nginx.conf的http block添加下面這兩項

  • Install tmux 2 on a CentOS 7 host

    As we all know, most of the packages provided by the official repository of CentOS 7 are outdated. In most cases, we must rely on third-party repositories to install newer software. I introduce you to my favorite IUS repository that provides latest upstream versions of most of the packages. IUS offers safe replacement and the…

  • Setting up GPG signing key for your git environment

    First of all, you need to install gpg into your operating system. Generate a new GPG key using the following command. Provide your name and email address, and enter O to confirm your information. It will then ask you to enter a password that protect your GPG key. The following screen shows that your first…

  • 折騰小米電視e32a 更換桌面並刪除小米全家桶

    説實話小米電視e32a到我家之後 雖然因爲放在樓下使用次數極多但也因爲沒有了谷歌的加持 很多功能都用不了 以至於明顯被嫌棄了而且最近小米電視突然有了開機15秒的廣告 讓我非常反感於是就想著折騰一下 看看root一下 刷個谷歌全家桶 然後再換個桌面

  • Upgrade GitLab docker container to newer version

    This following will show how to upgrade gitlab container to newer version along with issue you might meet and how we deal with it. First, you need to ensure that your gitlab container is using docker volumes to store the git repository, configuration and so on. You can use either use docker inspect to check…