i have 5 virtual hosts, one is the hostname on the vps server. it also has a ssl certificate.
the other 4 dont have ssl, now when i try view any of the others i get this
Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.
ssl virutal host config as follows
<VirtualHost SERVERIP:80>
ServerName www.MYSITE1.com
ServerAlias MYSITE1.com
SSLEngine on
DocumentRoot /var/www/html/MYSITE1.com/public_html
SSLCertificateFile /etc/ssl/certificate.crt
SSLCertificateKeyFile /etc/ssl/private/private.key
SSLCertificateChainFile /etc/ssl/ca_bundle.crt
Redirect permanent / https://URLREMOVED.com/
</VirtualHost>
<VirtualHost SERVERIP:443>
ServerName www.MYSITE1.com
ServerAlias MYSITE1.com
DocumentRoot /var/www/html/MYSITE1.com/public_html
SSLEngine on
SSLCertificateFile /etc/ssl/certificate.crt
SSLCertificateKeyFile /etc/ssl/private/private.key
SSLCertificateChainFile /etc/ssl/ca_bundle.crt
Protocols h2 http/1.1
<If "%{HTTP_HOST} == 'www.MYSITE1.com'">
Redirect permanent / https://MYSITE1.com/
</If>
# SSL Configuration
# Other Apache Configuration
</VirtualHost>
AND one of the other configs, the rest are similar, only difference is the domain and path. everyconfig has the server ip at the start instead of *
<VirtualHost SERVERIP.:80>
ServerAdmin [email protected]
ServerName www.MYSITE2.co.uk
ServerAlias mysite2.co.uk
DocumentRoot /var/www/html/mysite2./public_html
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.mysite2.\.co.uk$ [NC]
RewriteRule ^(.*)$ http://www.mysite2.co.uk/$1 [R=301,L]
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>``