XF 2.0 Issues with non existing subdomains from a different domain redirecting to xenforo

Kyotoku

Member
Greetings,

Whenever i give in a subdomain which doesn't exist in one of my two domain (examplepage1.com & examplepage2.com) it instantly directs to examplepage1.com which is the xenforo. Oddly enough it should show a 404 message but it rather just redirect to the xenforo without an HTTPS protocol. Any clue if this is being forced by xenforo or possibly a mistake on Apache2?

examplepage1.com-le-ssl.conf
Code:
<IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerAdmin dummyemail@gmail.com
        ServerName examplepage1.com
        ServerAlias www.examplepage1.com
        DocumentRoot /var/www/mgw/forum

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


Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/examplepage1.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/examplepage1.com/privkey.pem
</VirtualHost>
</IfModule>

examplepage1.com.conf
Code:
<VirtualHost *:80>
        ServerAdmin dummyemail@gmail.com
        ServerName examplepage1.com
        ServerAlias www.examplepage1.com
        DocumentRoot /var/www/mgw/forum

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

examplepage2.com-le-ssl.conf
Code:
<IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerAdmin dummyemail@gmail.com
        ServerName examplepage2.com
        ServerAlias www.examplepage2.com
        DocumentRoot /var/www/examplepage2.com

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
# Some rewrite rules in this file were disabled on your HTTPS site,
# because they have the potential to create redirection loops.

# RewriteCond %{SERVER_NAME} =www.examplepage2.com [OR]
# RewriteCond %{SERVER_NAME} =examplepage2.com
# RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]


Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/examplepage2.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/examplepage2.com/privkey.pem
</VirtualHost>
</IfModule>
<IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerAdmin dummyemail@gmail.com
        ServerName cv.examplepage2.com
        DocumentRoot /var/www/examplepage2.com/wip

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
# Some rewrite rules in this file were disabled on your HTTPS site,
# because they have the potential to create redirection loops.

# RewriteCond %{SERVER_NAME} =cv.examplepage2.com
# RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/examplepage2.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/examplepage2.com/privkey.pem
</VirtualHost>
</IfModule>
<IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerAdmin dummyemail@gmail.com
        ServerName dev.examplepage2.com
        DocumentRoot /var/www/examplepage2.com/dev

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
# Some rewrite rules in this file were disabled on your HTTPS site,
# because they have the potential to create redirection loops.

# RewriteCond %{SERVER_NAME} =dev.examplepage2.com
# RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]


Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/examplepage2.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/examplepage2.com/privkey.pem
</VirtualHost>
</IfModule>
<IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerAdmin dummyemail@gmail.com
        ServerName webmin.examplepage2.com
        ProxyPass / http://localhost:10000/
        ProxyPassReverse / http://localhost:10000/

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/examplepage2.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/examplepage2.com/privkey.pem
</VirtualHost>
</IfModule>

examplepage2.com.conf
Code:
<VirtualHost *:80>
        ServerAdmin dummyemail@gmail.com
        ServerName examplepage2.com
        ServerAlias www.examplepage2.com
        DocumentRoot /var/www/examplepage2.com

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.examplepage2.com [OR]
RewriteCond %{SERVER_NAME} =examplepage2.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<VirtualHost *:80>
        ServerAdmin dummyemail@gmail.com
        ServerName dev.examplepage2.com
        DocumentRoot /var/www/examplepage2.com/dev

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =dev.examplepage2.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<VirtualHost *:80>
        ServerAdmin dummyemail@gmail.com
        ServerName cv.examplepage2.com
        DocumentRoot /var/www/examplepage2.com/cv

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =cv.examplepage2.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<VirtualHost *:80>
        ServerAdmin dummyemail@gmail.com
        ServerName webmin.examplepage2.com
        ProxyPass / http://localhost:10000/
        ProxyPassReverse / http://localhost:10000/
RewriteEngine on
RewriteCond %{SERVER_NAME} =webmin.examplepage2.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<VirtualHost *:80>
ServerName hud.examplepage2.com

   ProxyRequests Off
   ProxyPreserveHost On
   ProxyVia Full
   <Proxy *>
      Require all granted
   </Proxy>

   <Location /hud>
      ProxyPass http://127.0.0.1:3000
      ProxyPassReverse http://127.0.0.1:3000
   </Location>

    <Directory "/var/www/html/sl-sf-bot">
    AllowOverride All
    </Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName yikes.examplepage2.com

   ProxyRequests Off
   ProxyPreserveHost On
   ProxyVia Full
   <Proxy *>
      Require all granted
   </Proxy>

   <Location /nodejs>
      ProxyPass http://127.0.0.1:8080
      ProxyPassReverse http://127.0.0.1:8080
   </Location>

    <Directory "/var/www/html/nodejs">
    AllowOverride All
    </Directory>
</VirtualHost>

Kind regards
Kyotoku
 
Back
Top Bottom