网络访问
- 在网络浏览器中访问 Poznote:
https://<SERVER-IP> - 接受 SSL 警告(自签名证书)。
- Poznote 凭证安全地存储在:
/root/poznote/.env
重要路径
- 安装目录:
/root/poznote - 持久数据:
/root/poznote/data - 环境文件:
/root/poznote/.env - docker-compose 文件:
/root/poznote/docker-compose.yml - Nginx 配置:
/etc/nginx/sites-available/poznote - SSL 证书:
/etc/nginx/ssl/
管理服务
码头工人:
cd /root/poznote
docker compose ps
docker compose logs -f
docker compose restart
nginx:
systemctl status nginx
systemctl restart nginx
为域启用 SSL
1. 将您的域名指向服务器IP。
2.编辑Nginx配置并替换两者 server_name <IP>; 与您的域名(<your-domain>) 对于 HTTP(端口 80)和 HTTPS(端口 443)块:
vim /etc/nginx/sites-available/poznote
3.安装Certbot:
apt install -y certbot python3-certbot-nginx
4. 运行以下命令生成有效的 Lets Encrypt 证书:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. 替换 Nginx 配置中的 SSL 路径:
vim /etc/apache2/sites-available/poznote
# Before:
# ssl_certificate /etc/nginx/ssl/fullchain.pem;
# ssl_certificate_key /etc/nginx/ssl/privkey.pem;
# After:
# ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
# ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;
6. 重新启动 Nginx 以应用更改:
systemctl restart nginx
7. 打开浏览器并访问: https://yourdomain.com