Jump to content


Photo

Cloudflare & SSL in new subdomain

cloudflare ssl subdomain

  • Please log in to reply
34 replies to this topic

#1 maicol07

maicol07

    Rank IV Member

  • Members
  • PipPipPipPip
  • 233 posts
  • Gender:Male
  • Location:Italy
  • Interests:Python, Android, Windows, HTML, PHP, JS, WordPress

Posted 20 July 2019 - 11:28 AM

Hi,

I've created a new subdomain (updates.maicol07.it) where I installed OctoberCMS from Softaculous. CPanel issued a self-signed certificate that expires next year but if you try to open https://updates.maicol07.it it says:

Ahoy! You're seeing this page because you've reached a website on our service that's not configured to accept secure connections (HTTPS).

If you're a visitor, try visiting this site again, removing the "https" in front of the website domain. Please note that your connection to this user's website will not be secure.

If you're the webmaster of this site, we recommend you take a few minutes to set up SSL so your visitors can connect securely. You can do this from your control panel. If you need assistance, please visit our support forums or Wiki.

Thanks for choosing HelioHost!

Sincerely,

What should I do? Wait for AutoSSL? Note that some days ago I've set up Cloudflare.

Thanks


Edited by maicol07, 20 July 2019 - 11:28 AM.

Python, Android and web developer.

Check me out:

My website
My apps website

My GPlay Developer Page

Blog


#2 sohamb03

sohamb03

    Rank VIII Member

  • Members
  • PipPipPipPipPipPipPipPip
  • 871 posts
  • Gender:Male
  • Location:India
  • Interests:Web Designing

Posted 20 July 2019 - 11:31 AM

Which server are you on?


Sayan Bhattacharyya


#3 maicol07

maicol07

    Rank IV Member

  • Members
  • PipPipPipPip
  • 233 posts
  • Gender:Male
  • Location:Italy
  • Interests:Python, Android, Windows, HTML, PHP, JS, WordPress

Posted 20 July 2019 - 11:32 AM

Which server are you on?

Tommy


Python, Android and web developer.

Check me out:

My website
My apps website

My GPlay Developer Page

Blog


#4 sohamb03

sohamb03

    Rank VIII Member

  • Members
  • PipPipPipPipPipPipPipPip
  • 871 posts
  • Gender:Male
  • Location:India
  • Interests:Web Designing

Posted 20 July 2019 - 11:34 AM

Then either remove Cloudflare association or ask an administrator to disable AutoSSL on your account. SInce Cloudflare SSL will be breaking AutoSSL  so both can't exist together.

 

Which one do you want to keep?


Sayan Bhattacharyya


#5 maicol07

maicol07

    Rank IV Member

  • Members
  • PipPipPipPip
  • 233 posts
  • Gender:Male
  • Location:Italy
  • Interests:Python, Android, Windows, HTML, PHP, JS, WordPress

Posted 20 July 2019 - 11:35 AM

Then either remove CLoudflare association or ask an administrator to disable AutoSSL on your account. SInce Cloudflare SSL will be breaking AutoSSL  so both can't exist together.

 

Which one do you want to keep?

If I disable Cloudflare SSL option, will AutoSSL work?


Python, Android and web developer.

Check me out:

My website
My apps website

My GPlay Developer Page

Blog


#6 sohamb03

sohamb03

    Rank VIII Member

  • Members
  • PipPipPipPipPipPipPipPip
  • 871 posts
  • Gender:Male
  • Location:India
  • Interests:Web Designing

Posted 20 July 2019 - 11:36 AM

Yep it will...you will need to wait for an Apache restart on Tommy(max 24 hours).


Sayan Bhattacharyya


#7 maicol07

maicol07

    Rank IV Member

  • Members
  • PipPipPipPip
  • 233 posts
  • Gender:Male
  • Location:Italy
  • Interests:Python, Android, Windows, HTML, PHP, JS, WordPress

Posted 20 July 2019 - 11:38 AM

This one, right?

immagine.png


Python, Android and web developer.

Check me out:

My website
My apps website

My GPlay Developer Page

Blog


#8 sohamb03

sohamb03

    Rank VIII Member

  • Members
  • PipPipPipPipPipPipPipPip
  • 871 posts
  • Gender:Male
  • Location:India
  • Interests:Web Designing

Posted 20 July 2019 - 11:40 AM

Yep.


Sayan Bhattacharyya


#9 maicol07

maicol07

    Rank IV Member

  • Members
  • PipPipPipPip
  • 233 posts
  • Gender:Male
  • Location:Italy
  • Interests:Python, Android, Windows, HTML, PHP, JS, WordPress

Posted 20 July 2019 - 11:44 AM

What about HSTS and Automatic HTTPS rewrites from Cloudflare?


Python, Android and web developer.

Check me out:

My website
My apps website

My GPlay Developer Page

Blog


#10 sohamb03

sohamb03

    Rank VIII Member

  • Members
  • PipPipPipPipPipPipPipPip
  • 871 posts
  • Gender:Male
  • Location:India
  • Interests:Web Designing

Posted 20 July 2019 - 11:46 AM

For https redirect:

 

For HTML: 

(Add a meta tag)

< meta http-equiv="Refresh" content="0;URL=https://www.example.com" />

For PHP:

< ?php function redirectTohttps() { if($_SERVER['HTTPS']!=”on”) { $redirect= “https://”.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];header(“Location:$redirect”); } } ?> 


Sayan Bhattacharyya


#11 maicol07

maicol07

    Rank IV Member

  • Members
  • PipPipPipPip
  • 233 posts
  • Gender:Male
  • Location:Italy
  • Interests:Python, Android, Windows, HTML, PHP, JS, WordPress

Posted 20 July 2019 - 11:49 AM

I've already set up redirects in .htaccess. So does those two Cloudflare options break AutoSSL?


Python, Android and web developer.

Check me out:

My website
My apps website

My GPlay Developer Page

Blog


#12 sohamb03

sohamb03

    Rank VIII Member

  • Members
  • PipPipPipPipPipPipPipPip
  • 871 posts
  • Gender:Male
  • Location:India
  • Interests:Web Designing

Posted 20 July 2019 - 11:53 AM

Yes...they will break AutoSSL as wolstech said in : https://www.helionet...ning-my-domain/


Sayan Bhattacharyya


#13 maicol07

maicol07

    Rank IV Member

  • Members
  • PipPipPipPip
  • 233 posts
  • Gender:Male
  • Location:Italy
  • Interests:Python, Android, Windows, HTML, PHP, JS, WordPress

Posted 20 July 2019 - 11:56 AM

Yes...they will break AutoSSL as wolstech said in : https://www.helionet...ning-my-domain/

Also HSTS?


Python, Android and web developer.

Check me out:

My website
My apps website

My GPlay Developer Page

Blog


#14 sohamb03

sohamb03

    Rank VIII Member

  • Members
  • PipPipPipPipPipPipPipPip
  • 871 posts
  • Gender:Male
  • Location:India
  • Interests:Web Designing

Posted 20 July 2019 - 12:02 PM

No...for HSTS add this to .htaccess : 

 

Header set Strict-Transport-Security "max-age=31536000" env=HTTPS


Sayan Bhattacharyya


#15 maicol07

maicol07

    Rank IV Member

  • Members
  • PipPipPipPip
  • 233 posts
  • Gender:Male
  • Location:Italy
  • Interests:Python, Android, Windows, HTML, PHP, JS, WordPress

Posted 20 July 2019 - 12:04 PM

Ok, so now my htaccess is like this and my site is broken by redirect error:

Header set Strict-Transport-Security "max-age=31536000" env=HTTPS

RewriteEngine On
# This will enable the Rewrite capabilities

# This checks to make sure the connection is not already HTTPS

RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
# This rule will redirect users from their original location, to the same location but using HTTPS.
# i.e.  http://www.example.com/foo/ to https://www.example.com/foo/
RewriteCond %{HTTP_HOST} ^maicol07\.it$ [OR]
RewriteCond %{HTTP_HOST} ^www\.maicol07\.it$
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^status$ "https\:\/\/status\.maicol07\.ml\/" [R=301,L]


Edited by maicol07, 20 July 2019 - 12:13 PM.

Python, Android and web developer.

Check me out:

My website
My apps website

My GPlay Developer Page

Blog






Also tagged with one or more of these keywords: cloudflare, ssl, subdomain

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users