Hello fellow Cloud-a-flareans. Rookie here seeking for help.
I have setup a web server running on NGINX on Debian 9 Stretch and managing my domain on Cloudflare.
I managed to install an SSL cert for my root domain using certbot with the dns-Cloudflare argument to install a Cloudflare SSL. This is one works flawlessly when accessing the root domain, say example.com or its www subdomain. The root domain serves a WordPress installation.
I want to serve a Prestashop installation on a sub-domain - shop.example.com
I’ve already installed Prestashop and can access it through the shop sub-domain but can’t get a Cloudflare SSL working on that particular sub-domain. Any ideas on how to go about this?
Also, I can only access the Prestashop installation at the shop sub-domain ONLY if I disable Cloudflare proxying on the particular sub-domain. If I enable proxying on it, the shop subdomain redirects to the root domain whereas I can access the WordPress installation on the root domain when it’s proxied. Kindly assist on this too.
It’s quite simple. The root domain is enabled on Cloudflare’s proxy. The Wordpress resource under that root domain is accessible when proxied, but for the shop subdomain, the Prestashop installation can’t be accessible when Cloudflare’s proxy is enabled on it; redirects to the root domain and displays the contents of the Wordpress installation. The Prestashop installation is only accessible when proxy is disabled on that shop subdomain
If so, and you want SSL, you would need a Dedicated SSL certificate with custom host names. Regular SSL certificates here only go as deep as *.example.com. Not *.*.example.com
Your shop host does not proxy through Cloudflare and hence Cloudflare’s certificate does not take effect. I could have already told you that 21 hours ago
Thanks @domjh for finally getting the OP to post the URL.
Alright, but right now it does not load shop either, but redirects to the naked domain, just like the www host.
Thats is an issue on your server, where you redirect shop to somewhere. Proxying rarely is the reason for such issues. You probably have somewhere a missing or incorrect virtual host configuration.
shop.netprosystems.co.ke is accessible now, you may check it out. Only accessible when proxy through Cloudflare is disabled, otherwise redirects to netprosystems.co.ke
The problem is most likely that this particular host is not served via HTTPS and an HTTPS request hits the default configuration which redirects back to the naked domain.