Přístup
- URL obchodu:
https://<SERVER_IP> - URL administrace:
https://<SERVER_IP>/<ADMIN_FOLDER>/(stored in/root/.cloudzy-creds) - Je nastaven self-signed SSL certifikát. Prohlížeč může zobrazit varování o certifikátu, pokračujte a web se otevře.
- Přihlašovací údaje jsou uloženy v:
/root/.cloudzy-creds
Důležité soubory a adresáře
- Adresář webu:
/var/www/litecart - Konfigurace LiteCart:
/var/www/litecart/includes/config.inc.php - Konfigurace Apache:
/etc/apache2/sites-available/litecart.conf - Certifikát SSL:
/etc/apache2/ssl/litecart.crt - Soukromý klíč SSL:
/etc/apache2/ssl/litecart.key - Přihlašovací údaje databáze:
/root/.cloudzy-creds
Správa Apache
Zkontrolovat stav:
systemctl status apache2
Restartovat Apache:
systemctl restart apache2
Zobrazit logy Apache:
journalctl -u apache2 -f
Ověřte konfiguraci:
apache2ctl configtest
Povolení HTTPS s doménou
1. Nasměruj svou doménu na IP serveru.
2. Upravit /etc/apache2/sites-available/litecart.conf a nahraďte obě ServerName <SERVER_IP> direktivy svou doménou (např. ServerName yourdomain.com;).
3. Nainstaluj Certbot:
apt install -y certbot python3-certbot-apache
4. Získejte certifikát Let's Encrypt:
certbot certonly --apache --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. Upravte /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. Znovu načtěte Apache, aby se změny projevily:
systemctl reload apache2
7. Otevři prohlížeč a přejdi na: https://yourdomain.com