Adgang
- Butiks-URL:
https://<SERVER_IP> - Admin-URL:
https://<SERVER_IP>/<ADMIN_FOLDER>/(stored in/root/.cloudzy-creds) - Der er konfigureret et selvsigneret SSL-certifikat. Din browser viser muligvis en certifikatadvarsel, fortsæt for at få adgang til sitet.
- Loginoplysninger er gemt i:
/root/.cloudzy-creds
Vigtige filer og mapper
- Sitemappe:
/var/www/litecart - LiteCart-konfiguration:
/var/www/litecart/includes/config.inc.php - Apache-konfiguration:
/etc/apache2/sites-available/litecart.conf - SSL-certifikat:
/etc/apache2/ssl/litecart.crt - SSL privat nøgle:
/etc/apache2/ssl/litecart.key - Databaseoplysninger:
/root/.cloudzy-creds
Administration af Apache
Tjek status:
systemctl status apache2
Genstart Apache:
systemctl restart apache2
Se Apache-logs:
journalctl -u apache2 -f
Validér konfigurationen:
apache2ctl configtest
Aktivering af HTTPS med et domæne
1. Peg dit domæne mod serverens IP.
2. Rediger /etc/apache2/sites-available/litecart.conf og erstat begge ServerName <SERVER_IP> direktiver med dit domæne (f.eks. ServerName yourdomain.com;).
3. Installer Certbot:
apt install -y certbot python3-certbot-apache
4. Få et Let's Encrypt-certifikat:
certbot certonly --apache --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. Redigér /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. Genindlæs Apache for at anvende ændringerne:
systemctl reload apache2
7. Åbn din browser og gå til: https://yourdomain.com