I have a website running on https://www.example.org/ I intend to create the http://games.example.com/ [without SSL].
I am running Apache 2 on Ubuntu 16 server.
I want the subdomain to remain http and the main domain to remain https. What should I do?
At the moment the settings are as it follows:
000-default.conf:
<VirtualHost *:80>
ServerName www.example.com
Redirect permanent "/" "https://www.example.com/"
#SSLProtocol all -SSLv2 -SSLv3
ServerAdmin [email protected]
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:80>
ServerName games.example.com
ServerAdmin [email protected]
DocumentRoot /var/www/games
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:80>
ServerName planets.example.com
ServerAdmin [email protected]
DocumentRoot /var/www/2moons
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
default-ssl/conf:
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin [email protected]
ServerName www.example.com
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/certificate.crt
SSLCertificateKeyFile /etc/ssl/private/private.key
<FilesMatch "\.(cgi|shtml|phtml|php|jpg)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
</VirtualHost>
</IfModule>
http://games.example.com/
, or does something not work when you try?http://games.example.com/
URL does a redirect tohttps://games.example.com/
? Because I can get tohttp://games.followarmy.com/
without any issues. I can't get to the HTTPS version, because you don't have an SSL certificate for it. That's how things are supposed to work.