I have recently set up Cloudflare for an extra domain.
I have already a few vhosts on my apache running, all of them are working fine (HTTP/HTTPS all fine).
But when accessing my domain with CF-Proxy I’ll get redirected to the default host. When I set up my domain to use DNS-Only it works perfectly fine.
Server Specs:
Webserver Apache2
OS: Debian 8 Jessie
Subdomain points to Origin via A record
I believe I earlier sent a direct request (not via Cloudflare) and it also returned your main page. I’d double check if there could be some glitch in your server configuration which might serve the other page for some reason (path, redirect, etc.).
Yeah that might be possible, because I played around with the configuration (with CF Proxy enabled).
If you clear caches and retry again now, it should return the Nothing here page.
I also reactivated CF Proxy, so if everything is as I expect, the issue will occur again later this day.
If you don’t mind I would give you a ping then.
For now I created sym-links to the main page to have at least static files served there, so I don’t mind if an answer takes a few hours. I just want to have it served for the future as I have to link all files manually at the moment.
<IfModule mod_ssl.c>
<VirtualHost cdn.zerotwo.dev:443>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/cdn
ServerName zerotwo.dev
ServerAlias cdn.zerotwo.dev
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
SSLCertificateFile /etc/letsencrypt/live/zerotwo.mystex.de/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/zerotwo.mystex.de/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
</IfModule>
I probably found the solution in the Virtual Host header… I set the domain there, but I cannot listen on Cloudflares edge-servers ips. However *:443 did not work, I had to specify the ip - Now it is working again.