未分类

在VPS上搭建博客时遇到的问题

这是一篇书签性质的文章

购买 VPS 和域名

8 GB Memory / 4 Intel vCPUs / 160 GB Disk / NYC1 - Ubuntu 20.04 (LTS) x64 初始化的时候可以选择是否只允许 ssh 登录

  • 域名在 GoDaddy 上购买的 .xyz 的辣鸡域名,15 块包年

  • DNS 托管服务

How To Point to DigitalOcean Nameservers From Common Domain Registrars

How To Use Dig, Whois, & Ping on an Ubuntu VPS to Query DNS Data

安装 nginx & 设置 server block (virtual hosts)

SSH 常见的问题

  • 创建新用户,并加入 sudo 用户组

Initial Server Setup with Ubuntu 20.04 step 2

  • 允许/屏蔽使用密码进行 ssh 连接

Initial Server Setup with Ubuntu 16.04 step 5

  • 新建的用户,只有密码如何才能配置通过 ssh key 访问

Initial Server Setup with Ubuntu 20.04 step 5

  • 如果 ssh 连接不上,如何打开调试

我就遇到过上面的步骤一步步来,但是就是连接不上,不知道哪一步可能有些微小的问题。ssh 客户端和服务端都是可以debug 的。 SSH-Key authentication fails 这里有如何开启调试的回答

  • vscode 中使用 ~/.ssh/config 配置文件连接 remote SSH 要注意哪些?

vscode ssh remote 官方文档

```yaml # dont use root@<ip address> as HOST, caution!!! vscode will treat is as as server instead of a name Host root HostName <your_host_ip_address> User root

Host aNameWithoutAt HostName <your_host_ip_address> IdentityFile ~/.ssh/do_qi_id_rsa # do not use relative path here! User <your_username> ```

关于 HTTPS 证书

  • 使用免费的 lets encrypt

How To Secure Nginx with Let's Encrypt on Ubuntu 20.04

关于 Github Pages 的 custom domain 设置

  • 分为 subdomain 和 apex domain,生效需要时间

Configuring a custom domain for your GitHub Pages site

关于 Github Actions

关于 mongodb

  • 参考官方文档(community version)

关于 docker

总结

Digital Ocean 的文档真香!