Closed svanimisetti closed 7 years ago
Hi, you have a mixed content problem:
Mixed Content: The page at 'https://svanimisetti.github.io/USDCND17/' was loaded over HTTPS, but requested an insecure stylesheet 'http://svanimisetti.github.io/USDCND17/css/screen.css'. This request has been blocked; the content must be served over HTTPS.
This is a SSL problem and not a theme problem. Read about the problem: What Is Mixed Content?
For my blog I used the following setup:
CNAME
file in root of the GitHub project and content https://jwillmer.de
Custom domain
in Project Settings
to jwillmer.de
Flexible
http://jwillmer.de/*
: Always use SSL
2) https://jwillmer.de/*
: Cache Level: Cache Everything
3) http://www.jwillmer.de/*
: Forwarding URL: 301 - Permanent (https://jwillmer.de/$1)
Please merge to the latest version. It does not fix your problem and the latest bug is resolved in your current fork but I refactored the urls in my last commit to improve the readabillity of the theme code.
Great! Thanks Jens.
@jwillmer A quick note. This issue was with mixed content and I was able to figure out why. I had by mistake used 'http' on the 'url' parameter in _config.yml file. I udated it to 'https' and the site is rendered properly now.
Ah, o. K., thx for the info I will reference this issue any time someone else will have such a problem :-)
Now that I listed all the steps in this issue I used it to create a quick blog post about the setup called Setup custom domain and SSL for GitHub hosted website
@jwillmer I have followed the instructions in your blog to the tee, but for some reasons am unable to get the website to work. Here are my steps and a few question:
If I disable all settings related to svanimsetti.in, and try to load http://svanimisetti.github.io - I see the "Hello World!" prompt as expected. Any of your thoughts would be really helpful.
Your _config.yml
looks o.k. too me but your CNAME
is missing https://
. I don't know if it makes a difference and it is hard for me to diagnose because you use essentially 3 services and there can be an error in any one of them. Let me know if the CNAME
change helps.
I read that GitHub does not promote having https://
in the CNAME but I guess using it forces SSL. I added an image of my current Cloudflare config to the blog post, maybe that helps you?
Are you using Cloudflare as your registrar too? I can see that Cloudflare redirects to https://svanimisetti.in. But for some reason, GitHub pages are not serving that request. Is there something specific to your setup - choice of service providers, etc? Perhaps you purchased some security/SSL certificates?
There is an option in your GitHub project to set a custom domain. I think it is set automatically by setting the CNAME but please double check.
I did not purchase any certificate.
@jwillmer After multiple permutations and combinations, I have managed to get the setup working. The settings for me are quite distinct to what you describe in your blog. I found that the "Crypto" and "DNS" settings were the main areas where I had to experiment. Now the website is up an running. I will be running up a similar blog with my learning shortly. Thanks a lot for your help!
Can you tell me which settings differ from mine so that I can edit the blog post?
@jwillmer Immediately below are GitHub settings. Further below is the summary of Cloudflare settings.
Added enforce_ssl: svanimisetti.in
to _config.yml (this is in addition to your recommendation).
Type | Name | Value | TTL |
---|---|---|---|
CNAME | svanimisetti.in | svanimisetti.github.io | Automatic |
CNAME | www | svanimisetti.github.io | Automatic |
SSL : Full Automatic HTTPS Rewrites : On
Note that the communication between GitHub and Cloudflare is also secured. So, it doesn't need to be 'Flexible' anymore. Note that 'Full (Strict)' will not work as GitHub/Cloudflare communication is not based on authenticated certificate.
These are identical to the settings you indicate in your blog.
I will be replicating this in my blog - with of course a link to your original post. Is that fine by you?
I am all set will my personal and project website. I am using your template for one of my project websites. I think its coming out fab! Thanks for helping out!
Cool, thx for the info. Feel free to post a tutorial as well 👍
I have merged your latest changes in my repo. Updated the _config.yml and robots.txt file to reflect the URLs for my site. I noticed that the styles are not rendered as in your demo website. There are no specific instructions in the Installation section. Am I missing something here.