把blog部署到华为云nginx
起因 本来博客是一直使用github pages进行部署的,但是国内的github.io太慢了,并且刚好在年末促销买了一台一年的华为云服务器,就想试一试。 在云服务器上安装nginx sudo apt-get install nginx nginx的常用命令 # 启动 Nginx 服务 sudo systemctl start nginx # 停止 Nginx 服务 sudo systemctl stop nginx # 重新启动 Nginx 服务(用于配置更改后使更改生效) sudo systemctl restart nginx # 重新加载 Nginx 配置文件(不中断服务) sudo systemctl reload nginx # 检查 Nginx 服务的状态 sudo systemctl status nginx # 测试配置文件的正确性(在实际重新加载或重启 Nginx 之前) sudo nginx -t # 显示 Nginx 的版本和配置选项 nginx -v # 设置 Nginx 开机自动启动 sudo systemctl enable nginx # 禁用 Nginx 开机自动启动 sudo systemctl disable nginx # 查看 Nginx 的错误日志(路径可能根据安装和配置有所不同) sudo tail -f /var/log/nginx/error....