This can be used as a template for further virtual hosts.
# domain: example.com # public: /var/www/example.com/ <VirtualHost actual_dedicated_ip:80> # Admin email, Server Name (domain name), and any aliases ServerAdmin admin@example.com ServerName www.example.com ServerAlias example.com Redirect permanent / https://www.example.com/ # Index file and Document Root (where the public files are located) DirectoryIndex index.html index.php DocumentRoot /var/www/example.com # Log file locations LogLevel warn ErrorLog /var/log/example.com-error.log CustomLog /var/log/example.com-access.log combined </VirtualHost> <VirtualHost actual_dedicated_ip:443> SSLEngine On SSLProtocol ALL -SSLv2 -SSLv3 SSLHonorCipherOrder On SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS SSLCertificateFile /etc/apache2/ssl/www.example.com.crt SSLCertificateKeyFile /etc/apache2/ssl/www.example.com.key SSLCertificateChainFile /etc/apache2/ssl/www.example.com.ca-bundle <Directory /var/www/example.com> Require all granted AllowOverride ALL </Directory> ServerAdmin admin@example.com ServerName example.com DocumentRoot /var/www/example.com ErrorLog /var/log/example.com-https_error.log CustomLog /var/log/example.com-https_access.log combined </VirtualHost>