vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   General Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=189)
-   -   How to enable full ssl (https://vborg.vbsupport.ru/showthread.php?t=326118)

final kaoss 02-16-2018 10:00 PM

How to enable full ssl
 
I'll be discussing how to enable full ssl and how to block unsecure content here.

The first big thing to do comes from a vbulletin.com article and is revised a bit.

Quote:

Originally Posted by https://www.vbulletin.com/forum/articles/4361080-converting-your-forum-to-https
vBulletin 3
Go to vBulletin Options > vBulletin Options > Site Name / URL / Contact Details.
Edit 'Forum URL' and add the 's' into the URL.
For example, if your URL is http://www.contoso.com/forum, change it to https://www.contoso.com/forum

Then go to Settings > vBulletin Options > vBulletin Options > Server Settings & Optimization Options > Use Remote YUI
Set this to None.

vBulletin 4
Go to Settings > Options > Site Name / URL / Contact Details.
Edit 'Forum URL' and add the 's' into the URL.
For example, if your URL is http://www.contoso.com/forum, change it to https://www.contoso.com/forum

Then go to Settings > Options > Server Settings & Optimization Options > Use Remote YUI
Set this to None.

vBulletin 5
Go to vBulletin Options > vBulletin Options > Site Name / URL / Contact Details.
Edit these three settings: 'vBulletin URL'; 'Login URL'; 'Core URL' and add the 's' into the URL.
For example, if your URL is http://www.contoso.com/forum, change it to https://www.contoso.com/forum
NOTE: Do not remove the word 'core' at the end of the core URL. You will break your site!

All Versions
Then go to Settings > Options > Server Settings & Optimization Options > Use Remote jQuery
Set this to None.

The key to all three vBulletin versions is that all you do in the URL settings is change http to https. Do not alter any other part of the URL.

Once you have changed these settings, go to AdminCP > Maintenance > General Update Tools, and rebuild the styles. (In vB3 this is AdminCP > Maintenance > Update Counters). Leave the default settings and just run this update tool.

After you get this done, you want to set a rewrite rule in htaccess.

This is what I use to rewrite http to https.

Code:

  RewriteEngine on
  #Options +FollowSymLinks
  ################https##############
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  ################https##############

Next go to cloudflare and enable these settings (under Crypto)
* SSL - Full
* Edge Certificates - make one "The certificates in the pack listed below are managed and auto-renewed by Cloudflare."
*HSTS
Code:

HTTP Strict Transport Security (HSTS)
Enforce web security policy for your website.
Status: On
Max-Age: 12 months
Include subdomains: On
Preload: On
No-sniff: On

* Require Modern TLS - On
* Opportunistic Encryption - On
* TLS 1.3 - Enabled+0RTT
* Automatic HTTPS Rewrites - On

Quote:

Why Should I use Automatic HTTPS Rewrites?
If your site contains links or references to HTTP URLs that are also available securely via HTTPS, Automatic HTTPS Rewrites can help. If you connect to your site over HTTPS and the lock icon is not present, or has a yellow warning triangle on it, your site may contain references to HTTP assets (?mixed content?).




Mixed content is often due to factors not under the website owner?s control such as embedded third-party content or complex content management systems. By rewriting URLs from ?http? to ?https?, Automatic HTTPS Rewrites simplifies the task of making your entire website available over HTTPS, helping to eliminate mixed content errors and ensuring that all data loaded by your website is protected from eavesdropping and tampering.




Does Automatic HTTPS Rewrites fix all mixed content errors?
No. Only URLs that are known to support HTTPS will be rewritten. We use data from EFF?s HTTPS Everywhere and Chrome?s HSTS preload list, among others, to identify which domains support HTTPS. If your zone is not on one of these lists, only active content will be rewritten. Passive content (such as images) will not be rewritten and will still cause mixed content errors.
That does it for cloudflare, after doing all of the above, your site is ready for SSL!

*Important! One last thing to do to ensure full SSL compatability is making sure that no insecure requests come through, this is how to do it with a description of what it does in the link.

Pop this in your headerincludes

Code:

<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
More info: CSP: upgrade-insecure-requests - HTTP | MDN



One extra thing that I do is use this mod. It fetches external images and serves them locally, meaning that they will not violate the mixed content policy due to the rewrite we did earlier.

There is also another mod that you can use to locally serve insecure (http) images.
https://vborg.vbsupport.ru/showthread.php?t=288060


CKEditor Loading Issues:
For users experiencing loading issues of ckeditor on vbulletin 4 with https enabled while using Chrome, here is a fix.

https://www.vbulletin.com/forum/foru...52#post4378752

final kaoss 02-25-2018 02:06 PM

After you enable https, you most likely will experience a drop in traffic for some time. You can read more about that here.
http://www.seoblog.com/2017/07/rankings-drop-https-ssl/

There are benefits including security plus using less server cpu & bandwidth. Some are
  1. is binary, instead of textual
  2. is fully multiplexed, instead of ordered and blocking
  3. can therefore use one connection for parallelism
  4. uses header compression to reduce overhead
  5. allows servers to “push” responses proactively into client caches
  6. Wait what? Don't worry - let's try to explain this a bit in layman's terms.

Binary instead of textual: this is something which makes transfer and parsing of the data much more efficient. Binary data transfer is also much less prone to errors.

Fully multiplexed: again, simply put, with HTTP the problem was that each connection was prone to blocking the connetions after it. Imagine yourself in the queue to get into your favourite sports match, but rather than having multiple entry points, you only had 1 turnstile. You can imagine that things can get very very slow. Multiplexing allows multiple files and requests to be transferred at the same time. In the turnstile example, rather than have one person going in at a time, we have 10 gates, with 10 turnstiles going in together.

Use one conection for parallelism: as we mentioned before, when a connection is expensive to create, if you keep creating and closing it for every resource you need, you're going to create a serious overhead issue. Multiplexing allows the same connection to be reused over and over again. Imagine the connection as a pipe through which data keeps flowing until you don't have any more data. Also, do note that for any website, you will typically have the browser talking to multiple web servers for various 3rd party scripts and resources (Facebook sharing scripts, Twitter, Google Analtics, Ad networks etc. etc.) Having one connection for each of these is more efficient.

Header compression is also another efficient way of removing several of the overheads associated with having to retrieve several different resources from the same or multiple web servers. Once again, typically rather than having to perform multiple to and fro trips, one trip is typically enough.

Allows servers to push resources proactively: this is a way that the server, rather than waiting for the client browser to request the different resources as per our first example, it will proactively send them resources they will probably need. This is called HTTP/2 Server push.

Thanks to collectiveray for the info.

gsmlover4u 08-22-2018 11:58 AM

I did but now forums icon not showing
www.gsmlover.com

In Omnibus 08-22-2018 01:28 PM

Quote:

Originally Posted by gsmlover4u (Post 2596087)
I did but now forums icon not showing
www.gsmlover.com

The forum icons need to be either an attachment or you need to change their URL to https

gsmlover4u 08-22-2018 01:59 PM

Quote:

Originally Posted by In Omnibus (Post 2596088)
The forum icons need to be either an attachment or you need to change their URL to https

how to change url
can you guide me please

rhody401 08-22-2018 05:04 PM

Your vb 4.x forum LOGO can be found here:

admin cp -> styles and templates -> style manager -> style variable editor -> GO

Search for TITLEIMAGE and click it. The path appears on the right, and it can be fixed there.

Mike

In Omnibus 08-22-2018 06:27 PM

Quote:

Originally Posted by gsmlover4u (Post 2596091)
how to change url
can you guide me please

Add the following to your .htaccess file:

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

final kaoss 08-22-2018 08:45 PM

Right now it looks like you have a ton of 404 errors, for images.

https://www.webpagetest.org/result/1...all_view_step1

Something isn't configured right... If I go to a image from the results page, that image stays cached until I hit Shift +F5 in chrome (forces it to clear cache for a page & redownload everything as if it's never been there).

As far as I can tell this seems to be an apache issue, as I can view the images if I open them in either the webpagetest results page or if I view your source code and click that link. However, if I try to right click an image and open it in a new tab, it throws a 404 error.

I suggest you try some of these links for a potential fix.
https://www.google.com/search?ei=bCx....0.ChDRl6wSBBU

gsmlover4u 08-23-2018 03:18 PM

Quote:

Originally Posted by In Omnibus (Post 2596096)
Add the following to your .htaccess file:

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

i did this but nothing happend

--------------- Added [DATE]1535044964[/DATE] at [TIME]1535044964[/TIME] ---------------

Quote:

Originally Posted by final kaoss (Post 2596097)
Right now it looks like you have a ton of 404 errors, for images.

https://www.webpagetest.org/result/1...all_view_step1

Something isn't configured right... If I go to a image from the results page, that image stays cached until I hit Shift +F5 in chrome (forces it to clear cache for a page & redownload everything as if it's never been there).

As far as I can tell this seems to be an apache issue, as I can view the images if I open them in either the webpagetest results page or if I view your source code and click that link. However, if I try to right click an image and open it in a new tab, it throws a 404 error.

I suggest you try some of these links for a potential fix.
https://www.google.com/search?ei=bCx....0.ChDRl6wSBBU

my 2 forums on the same server but the 2nd one is working fine with SSL but this forum creating problem
on the same server, apache can be the problem?

final kaoss 08-23-2018 04:07 PM

I can't say for sure but it looks like it. Check out this thread where someone had a kindof similar issue.
https://www.linuxquestions.org/quest...he-4175456462/

Let me ask you this... when you enabled SSL for your gsm forum.. what all did you do? Because if you have ssl enabled already, then all you should need to use what I mentioned in step 1...
Code:

vBulletin 4
Go to Settings > Options > Site Name / URL / Contact Details.
Edit 'Forum URL' and add the 's' into the URL.
Example: https://www.vgchat.us

plus put this in the headers.

<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

with the htaccess code as a optional failsafe incase that doesn't catch it all.


All times are GMT. The time now is 06:52 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01323 seconds
  • Memory Usage 1,788KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete