# Apache vhost example for GSP Panel # Copy to: /etc/apache2/sites-available/panel.example.com.conf # # Enable modules once: # sudo a2enmod ssl rewrite headers # # Enable site: # sudo a2ensite panel.example.com.conf # sudo apache2ctl configtest # sudo systemctl reload apache2 # # Issue certificate (Apache plugin): # sudo certbot --apache -d panel.example.com -d www.panel.example.com # # Alternative webroot issuance: # sudo certbot certonly --webroot -w /var/www/gsp/Panel \ # -d panel.example.com -d www.panel.example.com # # Renewal test: # sudo certbot renew --dry-run ServerName panel.example.com ServerAlias www.panel.example.com DocumentRoot /var/www/html/Panel Options FollowSymLinks AllowOverride All Require all granted RewriteEngine On RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/ RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] ErrorLog ${APACHE_LOG_DIR}/panel_example_error.log CustomLog ${APACHE_LOG_DIR}/panel_example_access.log combined ServerName panel.example.com ServerAlias www.panel.example.com DocumentRoot /var/www/html/Panel Options FollowSymLinks AllowOverride All Require all granted SSLEngine on SSLCertificateFile /etc/letsencrypt/live/panel.example.com/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/panel.example.com/privkey.pem Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains" ErrorLog ${APACHE_LOG_DIR}/panel_example_ssl_error.log CustomLog ${APACHE_LOG_DIR}/panel_example_ssl_access.log combined