Announcement

Collapse
No announcement yet.

SSL setup

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SSL setup

    Is there a method of procedure for setting a site up to SSL available?
    vB Mods That Rock!

  • #2
    It's fairly straightforward:

    1. Install SSL certificate on server
    2. Update the three URL settings in the admincp to reflect https
    3 Redirect http to https at server side.
    MARK.B | vBULLETIN SUPPORT

    TalkNewsUK - My vBulletin 5.5.6 Demo
    AdminAmmo - My Cloud Demo

    Comment


    • NumNum
      NumNum commented
      Editing a comment
      Thank you, Mark!

  • #3
    Originally posted by Mark.B View Post
    It's fairly straightforward:

    1. Install SSL certificate on server
    2. Update the three URL settings in the admincp to reflect https
    3 Redirect http to https at server side.
    Should it be all three? I'm trying to set this up at the moment and in admincp, settings, options, site name/URL/Contact Details the only one that's specified as for SSL is the one saying Login URL. What happens if you don't change all three but just change the Login URL?

    Comment


    • #4
      You can but it's recommended to make the entire site as https if you have SSL. Google prefers secure sites more. And soon Chrome will put a scary warning at the address bar for non-https sites.

      GIPHY for vB5 AutoLinker Auto-Create Flag Report Topic Social Icons in Postbit Clear Cache Cron DragDrop Upload Topic AJAX AutoUpdate Custom Avatars Selector Stop Links in Posts...and more!

      Comment


      • #5
        Originally posted by Mark.B View Post
        It's fairly straightforward:

        1. Install SSL certificate on server
        2. Update the three URL settings in the admincp to reflect https
        3 Redirect http to https at server side.
        I have all three URL settings in the admincp reflecting https.

        How do I 'Redirect http to https at server side'. Do I do this via .htaccess and if so, what do I put in the file.

        Comment


        • #6
          Originally posted by Mark.B View Post
          It's fairly straightforward:

          1. Install SSL certificate on server
          2. Update the three URL settings in the admincp to reflect https
          3 Redirect http to https at server side.
          I never got an answer to this. What code do I put in the .htaccess file to redirect http to https?

          Is it:

          RewriteEngine On
          RewriteCond %{HTTP_HOST} ^mysite\.com [NC]
          RewriteCond %{SERVER_PORT} 80
          RewriteRule ^(.*)$ https://www.mysite.com/$1 [R,L]

          Or something else?

          Last edited by jdj; Tue 21st Mar '17, 10:16am.

          Comment


          • #7
            Originally posted by jdj View Post

            I have all three URL settings in the admincp reflecting https.

            How do I 'Redirect http to https at server side'. Do I do this via .htaccess and if so, what do I put in the file.
            Add this code directly under the RewriteBase line in your .htaccess file.

            Code:
                #To redirect users to the secure version of your site, uncomment the lines below
                RewriteCond %{HTTPS} !=on
                RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
            Translations provided by Google.

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud demonstration site.
            vBulletin 5 API - Full / Mobile
            Vote for your favorite feature requests and the bugs you want to see fixed.

            Comment


            • #8
              Originally posted by Wayne Luke View Post

              Add this code directly under the RewriteBase line in your .htaccess file.

              Code:
              #To redirect users to the secure version of your site, uncomment the lines below
              RewriteCond %{HTTPS} !=on
              RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
              I did this. What I found was that the site is still accessible from http so it didn't appear to work. What it did do was to inactivate the login feature. If I go to login now I get the error message:

              NOT FOUND

              The requested URL/auth/login-form was not found on this server.

              Apache server at mysite.com Port 443

              So what code should I use in the .htaccess file? The reason I need to know is that having switched https on and changed all three URLs in the admincp to https, if I go to my site via http://mysite.com it doesn't let me login and presumably doesn't let anybody else login. It only lets me login if I go directly to https://mysite.com. So I do need to redirect.


              To be clear: The first 12 lines of my modified .htaccess file read exactly as follows:


              <IfModule mod_rewrite.c>
              RewriteEngine On

              # In some cases where you have other mod_rewrite rules, you may need to remove the
              # comment on the following RewriteBase line and change it to match your folder name.
              # This resets the other mod_rewrite rules for just this directory
              # If your site was www.example.com/forum, the setting would be /forum/
              #RewriteBase /

              #To redirect users to the secure version of your site, uncomment the lines below
              RewriteCond %{HTTPS} !=on
              RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]

              ---------

              Reversing the changes also allows me to login to the site from the front end from https if I navigate there directly then. So it's this code that's causing the problem.

              Specifically what code should I use?
              Last edited by jdj; Wed 22nd Mar '17, 5:50am.

              Comment


              • #9
                It should redirect everything to HTTPS. If you're getting 404 errors, you need to discuss this with your hosting provider as this is a server directive. We are only providing it as a courtesy. They may need different directives based on their server configurations.
                Translations provided by Google.

                Wayne Luke
                The Rabid Badger - a vBulletin Cloud demonstration site.
                vBulletin 5 API - Full / Mobile
                Vote for your favorite feature requests and the bugs you want to see fixed.

                Comment


                • #10
                  If it helps, I use this and it works fine:
                  Code:
                  RewriteCond %{HTTPS} off
                  RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
                  MARK.B | vBULLETIN SUPPORT

                  TalkNewsUK - My vBulletin 5.5.6 Demo
                  AdminAmmo - My Cloud Demo

                  Comment


                  • #11
                    Originally posted by Mark.B View Post
                    If it helps, I use this and it works fine:
                    Code:
                    RewriteCond %{HTTPS} off
                    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
                    That gave me a tab saying 302 found and a white page saying
                    Found

                    The document has moved here.
                    Apache Server at [mysite.com] Port 80

                    Comment


                    • #12
                      My host suggested this:

                      QUOTE:

                      Based on a search, to force all web traffic to use HTTPS, you should be able to use the below in your htaccess file

                      RewriteEngine On
                      RewriteCond %{SERVER_PORT} 80
                      RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]

                      To force traffic for a specific domain to use HTTPS, you would use

                      RewriteEngine On
                      RewriteCond %{HTTP_HOST} ^example\.com [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]

                      With regards to the 404 errors you are seeing, this may be a result of the order of the rewrite rules - they are called in the order in which they appear in the htaccess, so you may need rearrange the existing rewrite rules you have set up to get it to work as intended.

                      END QUOTE:

                      The 2nd suggestion didn't seem to do anything at all. The first does seem to redirect all traffic to https but we have an EV SSL. When I view the site in Firefox I see the EV SSL, when I view it in IE I don't. So given that this partly works, what would I have to do to get IE to show the EV SSL as well?

                      Comment


                      • #13
                        What is an EV SSL?
                        Translations provided by Google.

                        Wayne Luke
                        The Rabid Badger - a vBulletin Cloud demonstration site.
                        vBulletin 5 API - Full / Mobile
                        Vote for your favorite feature requests and the bugs you want to see fixed.

                        Comment


                        • #14
                          Originally posted by Wayne Luke View Post
                          What is an EV SSL?
                          Extended Validation SSL - it shows a green bar in the browser with the name of the company in whose name the domain is registered for extra security.

                          Example here.

                          https://bank.barclays.co.uk/olb/auth/LoginLink.action

                          Comment


                          • #15
                            Originally posted by jdj View Post

                            Extended Validation SSL - it shows a green bar in the browser with the name of the company in whose name the domain is registered for extra security.

                            Example here.

                            https://bank.barclays.co.uk/olb/auth/LoginLink.action
                            This isn't something we've tested or investigated. Can't see any reason why it wouldn't work though.
                            MARK.B | vBULLETIN SUPPORT

                            TalkNewsUK - My vBulletin 5.5.6 Demo
                            AdminAmmo - My Cloud Demo

                            Comment

                            Related Topics

                            Collapse

                            Working...
                            X