Friday, December 15, 2017

ssl - apache https port 80 redirects to wrong https site




When I listen to port 80 in /etc/apache2/sites-available/majichook.com.conf and do a permanent redirect to https://majichook.com for some reason it is forwarding to my https://99centbeats.com instead. Everything looks right in the file. I am very confused... I have other domains with SSL certificates on this server that forward fine with the same exact setup.



majichook.com.conf:





ServerName majichook.com
Redirect permanent / https://majichook.com/






ServerName majichook.com
ServerAlias www.majichook.com

SSLEngine On
SSLCertificateFile /var/www/majichook.com/majichook_com.crt
SSLCertificateKeyFile /var/www/majichook.com/majichook.com.key

SSLCACertificateFile /var/www/majichook.com/majichook_com.ca-bundle

ServerAdmin admin@majichook.com
DocumentRoot /var/www/majichook.com

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined




Answer



When reconfiguring Apache



Always clear your browser's cache


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...