redirect https

Discussion in 'General' started by black-hole-sun, Jul 26, 2012.

  1. black-hole-sun

    black-hole-sun New Member

    Hello, can someone help me?
    I'm installed ispconfig 3 with ssl.
    register ssl on my domain
    how could I redirect from http to https
    (http://domian.com to https://domain.com)
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. black-hole-sun

    black-hole-sun New Member

    if i open http://domain.com, i see 400 - Bad request
    but if i open https://domain.com than i see my site

    in /var/www/domain.com/web/.htacces
    rules work on the https
    if open http nothing

    can I change rules in apache? redirect by default on https?
    and how?
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Are there any errors in the web site's error log?
     
  5. abintipl

    abintipl Member HowtoForge Supporter

    Sir,

    I have four websites on my server

    As per this post, I went to ISPconfig panel &
    Under Sites>Webdomain>Options
    Under Options, I can see box for "Apache Directives" & have added

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}two of the sites

    Save!

    It works!

    Hope I have to repeat for all the Web Domains for which I need this rule from http:// to https://

    Please confirm!

    Thanks & regards,
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    If what you want to do is rewrite http to https for your websites, easier way is to go to that websites Redirect tab and turn on
    Code:
    Rewrite HTTP to HTTPS
     
  7. abintipl

    abintipl Member HowtoForge Supporter

    Thank you so much Sir!

    B/R
     
  8. abintipl

    abintipl Member HowtoForge Supporter

    Dear Sir,
    Today, I have installed a new VPS & followed all the steps for http:// to https:// as well installed Let's Encrypt

    But I am not able to see redirecting happening

    When I try https://mydomian.com it shows but at the same time I see i warning (Your connection to the site not fully secured)

    I tried following commands

    root@host:/# type -a certbot
    certbot is /usr/bin/certbot
    root@host:/# apt-cache policy certbot
    certbot:
    Installed: 0.28.0-1~deb9u2
    Candidate: 0.28.0-1~deb9u2
    Version table:
    *** 0.28.0-1~deb9u2 500
    500 http://asi-fs-n.contabo.net/debian stretch/main amd64 Packages
    500 http://ftp.us.debian.org/debian stretch/main amd64 Packages
    500 http://asi-fs-n.contabo.net/debian stretch-updates/main amd64 Packages
    100 /var/lib/dpkg/status
    root@host:/#

    May I request, what could be the problem

    Looking forward to advise

    B/R
     
    Last edited: Jul 27, 2019
  9. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Which certificate is used on that page? Examine in browser, click the lock icon in address bar. Is the certificate you create really working?
    You have not stated what the problem is. I am assuming httpS works but plain http does not. What happens when you use plain http:// to access the website?
     
  10. abintipl

    abintipl Member HowtoForge Supporter

    It shows Let's Encrypt with Validity Created on July 27 until Oct 25, 2019

    It works when I use plain http:// my domain.com and takes me to https://mudomian.com

    Problem, now I see is Icon with a warning (Your connection to the site not fully secured) Attackers might be able to see the images....

    Thanks & regards,
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Probably you missed configuring your CMS system for https. Login to your cms and check if there are any URL's that use http:// in the cms settings.
     
  12. abintipl

    abintipl Member HowtoForge Supporter

    Resolved!
    Thank you Sir!
     

Share This Page