الوصول
- رابط المتجر:
https://<SERVER_IP> - رابط لوحة الإدارة:
https://<SERVER_IP>/<ADMIN_FOLDER>/(stored in/root/.cloudzy-creds) - تم إعداد شهادة SSL موقّعة ذاتيًا. قد يعرض متصفحك تحذيرًا بشأن الشهادة، تابع للوصول إلى الموقع.
- تُخزَّن بيانات تسجيل الدخول في:
/root/.cloudzy-creds
الملفات والمجلدات المهمة
- مجلد الموقع:
/var/www/litecart - إعدادات LiteCart:
/var/www/litecart/includes/config.inc.php - إعدادات Apache:
/etc/apache2/sites-available/litecart.conf - شهادة SSL:
/etc/apache2/ssl/litecart.crt - المفتاح الخاص SSL:
/etc/apache2/ssl/litecart.key - بيانات اعتماد قاعدة البيانات:
/root/.cloudzy-creds
إدارة Apache
التحقق من الحالة:
systemctl status apache2
أعد تشغيل Apache:
systemctl restart apache2
اعرض سجلات Apache:
journalctl -u apache2 -f
تحقّق من صحة الإعدادات:
apache2ctl configtest
تمكين HTTPS باستخدام نطاق
1. وجِّه نطاقك إلى IP الخادم.
٢. تحرير /etc/apache2/sites-available/litecart.conf واستبدل كلا ServerName <SERVER_IP> التوجيهين بنطاقك (على سبيل المثال ServerName yourdomain.com;).
3. ثبّت Certbot:
apt install -y certbot python3-certbot-apache
4. احصل على شهادة Let's Encrypt:
certbot certonly --apache --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. عدّل /etc/apache2/sites-available/litecart.conf and replace the SSL certificate paths.
Before:
SSLCertificateFile /etc/apache2/ssl/litecart.crt
SSLCertificateKeyFile /etc/apache2/ssl/litecart.key
After:
SSLCertificateFile /etc/letsencrypt/live/yourdomain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/yourdomain.com/privkey.pem
6. أعد تحميل Apache لتطبيق التغييرات:
systemctl reload apache2
7. افتح متصفحك وزُر: https://yourdomain.com