: Subdomain showing incorrect content when going through HTTPS I have a domain on my server called example.com and I set up a subdomain called links.example.com. Whenever I go to links.example.com,
I have a domain on my server called example.com and I set up a subdomain called links.example.com. Whenever I go to links.example.com, the domain is pointing to the same directory, even though in the cPanel settings, I told it to go to /public_html/links instead of just public_html
What's weird is whenever I go to it through non-HTTPS, it points to the correct directory that I need it to go.
I do not have a .htaccess file setup yet. I read online that you can fix the issue by adding an SSL cert to that subdomain, but because I'm using cloudflare's SSL, I don't have an SSL cert to provide.
So for clarification: example.com - shows content from /public_html/ (as it should) example.com - shows content from /public_html/ (as it should) links.example.com - shows content from /public_html/links/ (as it should) links.example.com - shows content from /public_html/ (which it shouldn't)
More posts by @Berumen354
1 Comments
Sorted by latest first Latest Oldest Best
I fixed the issue using a cheap workaround. If anyone knows of any better, feel free to answer as well.
The issue was, there was no virtualhost for that subdomain for SSL. cPanel won't make a virtualhost unless there's a cert installed for that domain. I made a self-signed cert and installed it for that subdomain.
Since I'm using cloudflare's SSL, the self-signed doesn't matter, and the virtual host is now listening on port 433 meaning that SSL works properly for that subdomain.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.