ウェブアクセス
URL: https://<IP>/
HTTPポート 80 HTTPS にリダイレクトします 443.
デフォルトアカウント:
- ユーザー名:
owner - パスワード:
owner123
重要:Webインターフェース上でデフォルトのパスワードをすぐに変更してください。
環境設定
ファイル: /opt/zy/.env
環境変数を更新するには、編集してください .env サービスを再起動する:
systemctl restart zy.service
重要なファイルとディレクトリ
- Zy バイナリ:
/opt/zy/zy - 環境変数(API トークン、公開 URL):
/opt/zy/.env - Systemdユニット:
/etc/systemd/system/zy.service - Nginx サイト設定:
/etc/nginx/sites-available/zy - Nginx サイトが有効化されました:
/etc/nginx/sites-enabled/zy - 自己署名 SSL 証明書:
/etc/nginx/ssl/
systemd サービス管理
# Restart the Zy service
systemctl restart zy.service
# Check Zy status
systemctl status zy.service
# Restart the Nginx service
systemctl restart nginx.service
# Check Nginx status
systemctl status nginx.service
ドメインでSSLを有効化する
1. ドメインをサーバーIPに向ける。
2. Nginxの設定を編集し、両方を置き換える server_name <IP>; あなたのドメイン (<your-domain>) をHTTP (ポート80) とHTTPS (ポート443) の両方のブロックに設定:
vim /etc/nginx/sites-available/zy
3. Certbotをインストール:
apt install -y certbot python3-certbot-nginx
4. 有効なLet's Encrypt証明書を生成するには、次のコマンドを実行してください:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. Nginx設定内のSSLパスを置き換える:
vim /etc/apache2/sites-available/zy
# 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. 更新 PUBLIC_BASE_URL in /opt/zy/env:
PUBLIC_BASE_URL=https://yourdomain.com
8. 変更を反映させるため、Zy を再起動する:
systemctl restart zy
9. ブラウザを開いて次にアクセス: https://yourdomain.com