الوصول إلى الويب
URL: https://<IP>/
منفذ HTTP 80 إعادة التوجيه إلى HTTPS 443.
الحساب الافتراضي:
- اسم المستخدم:
owner - كلمة المرور:
owner123
هام: قم بتغيير كلمة المرور الافتراضية على الفور في واجهة الويب.
تكوين البيئة
ملف: /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. قم بتشغيل الأمر التالي لإنشاء شهادة Lets Encrypt صالحة:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. استبدل مسارات SSL في تكوين Nginx:
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 في /opt/zy/env:
PUBLIC_BASE_URL=https://yourdomain.com
8. أعد تشغيل Zy لتطبيق التغييرات:
systemctl restart zy
9. افتح متصفحك وانتقل إلى: https://yourdomain.com