Dostęp
- Adres sklepu:
https://<SERVER_IP> - Adres panelu administratora:
https://<SERVER_IP>/<ADMIN_FOLDER>/(stored in/root/.cloudzy-creds) - Skonfigurowano samopodpisany certyfikat SSL. Przeglądarka może wyświetlić ostrzeżenie o certyfikacie, kontynuuj, aby otworzyć witrynę.
- Dane logowania są zapisane w:
/root/.cloudzy-creds
Ważne pliki i katalogi
- Katalog witryny:
/var/www/litecart - Konfiguracja LiteCart:
/var/www/litecart/includes/config.inc.php - Konfiguracja Apache:
/etc/apache2/sites-available/litecart.conf - Certyfikat SSL:
/etc/apache2/ssl/litecart.crt - Klucz prywatny SSL:
/etc/apache2/ssl/litecart.key - Dane dostępowe bazy danych:
/root/.cloudzy-creds
Zarządzanie Apache
Sprawdź stan:
systemctl status apache2
Uruchom ponownie Apache:
systemctl restart apache2
Wyświetl logi Apache:
journalctl -u apache2 -f
Zweryfikuj konfigurację:
apache2ctl configtest
Włączanie HTTPS z domeną
1. Skieruj swoją domenę na IP serwera.
2. Edycja /etc/apache2/sites-available/litecart.conf i zastąp oba ServerName <SERVER_IP> dyrektywy swoją domeną (np. ServerName yourdomain.com;).
3. Zainstaluj Certbot:
apt install -y certbot python3-certbot-apache
4. Uzyskaj certyfikat Let's Encrypt:
certbot certonly --apache --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. Edytuj /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. Przeładuj Apache, aby zastosować zmiany:
systemctl reload apache2
7. Otwórz przeglądarkę i odwiedź: https://yourdomain.com