0

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:

<VirtualHost *:80>

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

</VirtualHost>

<VirtualHost *:443>

    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

</VirtualHost>
Jeff
  • 113
  • 5
  • Nothing in this part of the config. Maybe a .htaccess or a document in the documentroot? – Gerard H. Pille Jun 21 '18 at 20:03
  • I do not see any in the document root, after you mentioned .htaccess I created one specifically for this, restarted apache, and it still is forwarding to the 99centbeats.com ... it seems odd, normally it works. I will keep looking! – Jeff Jun 21 '18 at 20:14
  • 1
    Your browser's cache? – Gerard H. Pille Jun 21 '18 at 23:30
  • @Gerard H. Pille, I think that may be it, just tried on my phone and it worked. Haha It even crossed my mind to clear my cache but I didn't see how it would cause that domain to forward to another site. Thanks Gerald! About to test on my PC! Update: Yes that was it! – Jeff Jun 22 '18 at 00:03

2 Answers2

2

When reconfiguring Apache

Always clear your browser's cache

Gerard H. Pille
  • 2,569
  • 1
  • 13
  • 11
0

Thanks to @Gerard H. Pille for recommending to clear the cache on my browser, that was causing the issue! It is working now!

Jeff
  • 113
  • 5