vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   Step by Step guide to speed up your VB4 OR VB3 (https://vborg.vbsupport.ru/showthread.php?t=267588)

ozzy47 03-09-2014 11:46 PM

Here is my latest results for my site, pretty frigging good for vB4, http://www.webpagetest.org/result/140309_D0_RWZ/

final kaoss 03-10-2014 01:25 AM

Now if only vb.org did some of the changes :)
http://www.webpagetest.org/result/140310_RR_1G9/

ozzy47 03-10-2014 01:26 AM

Yeah it could use some tweaking, but it is vB3, so it loads quickly.

Max Taxable 03-10-2014 02:47 AM

Quote:

Originally Posted by final kaoss (Post 2486135)
Now if only vb.org did some of the changes :)
http://www.webpagetest.org/result/140310_RR_1G9/

They have some images that need to be optimized, and some they really can't control because they are avatars.

But when we test their home page, we see result without avatars and the images they need to optimize are listed: http://www.webpagetest.org/result/14...ompress_images

But it only winds up being a savings of 4.8kb, hardly seems worth the effort just to get a A grade on that..

However they're not caching static assets very well.
HTML Code:

Leverage browser caching of static assets: 3/100

FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/images/cstyle/redstyle.gif
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/images/cstyle/whitestyle.gif
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/images/cstyle/greenstyle.gif
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/images/cstyle/bluestyle.gif
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/images/cstyle/purplestyle.gif
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/images/misc/stats.gif
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/images/misc/birthday.gif
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/images/misc/menu_open.gif
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/images/cstyle/blue/header.jpg
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/images/cstyle/blue/tcat.jpg
FAILED - (No max-age or expires) - http://www.vbulletin.org/favicon.ico
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/images/cstyle/bottomshade.gif
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/images/cstyle/blue/headbg.jpg
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/images/cstyle/blue/vheader.jpg
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/images/cstyle/button2.gif
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/images/misc/whos_online.gif
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/images/cstyle/blue/buttons/collapse_thead.gif
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/clientscript/vbulletin_menu.js?v=3612
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/images/cstyle/blue/vblogo.gif
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/clientscript/vborg_miscactions.js?v=3612
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/clientscript/blue.css
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/clientscript/vbulletin_global.js?v=3612
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/clientscript/vbulletin_md5.js?v=3612
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/images/cstyle/blue/bodybkgd950px.jpg
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/images/cstyle/blue/buttons/lastpost.gif
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/clientscript/vbulletin_read_marker.js?v=3612
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/images/cstyle/blue/statusicon/subforum_old.gif
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/images/cstyle/blue/statusicon/forum_old.gif
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/images/misc/navbits_start.gif
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru/images/cstyle/blue/buttons/collapse_tcat.gif
FAILED - (No max-age or expires) - https://vborg.vbsupport.ru

And that's a very easy .htaccess fix.

But with only 90 total KB loaded and only 34 requests, it's not nearly as bad as the grades might seem to make it look.

It's about 15 minutes work to fix everything here and get straight A grades.

final kaoss 03-10-2014 11:54 AM

It wouldn't even take 15 minutes to apply the caching. Maybe 1-3 at most depending on who's modifying it :) but yeah that is one of the big issues is not having their static elements being cached.

bzcomputers 03-22-2014 06:05 AM

I noticed a couple issues at the bottom of the last two sections in the suggested .htaccess file:

Code:

# proc/self/environ? no way!
RewriteCond %{QUERY_STRING} proc/self/environ [OR]
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*(.*) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|[|\%[0-9A-Z]{0,2})
*** ADD RULE HERE***
##
##&nbsp; Commented version of Rewrite rules attributed to Ronald van den Heetkamp
##&nbsp; Comments by http://bodvoc.com
#
# Prevent use of specified methods in HTTP Request
RewriteCond %{REQUEST_METHOD} ^(HEAD|TRACE|DELETE|TRACK) [NC,OR]
# Block out use of illegal or unsafe characters in the HTTP Request
RewriteCond %{THE_REQUEST} ^.*(\\r|\\n|%0A|%0D).* [NC,OR]
# Block out use of illegal or unsafe characters in the Referer Variable of the HTTP Request
RewriteCond %{HTTP_REFERER} ^(.*)(<|>|'|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]
# Block out use of illegal or unsafe characters in any cookie associated with the HTTP Request
RewriteCond %{HTTP_COOKIE} ^.*(<|>|'|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]
# Block out use of illegal characters in URI or use of malformed URI
RewriteCond %{REQUEST_URI} ^/(,|;|:|<|>|">|"<|/|\\\.\.\\).{0,9999}.* [NC,OR]
# NOTE - disable this rule if your site is integrated with Payment Gateways such as PayPal
# Block out  use of empty User Agent Strings
RewriteCond %{HTTP_USER_AGENT} ^$ [OR]
# Block out  use of User Agent Strings beginning with java, curl or wget
RewriteCond %{HTTP_USER_AGENT} ^(java|curl|wget).* [NC,OR]
# Block out  use of User Agent Strings containing specific robot (crawler) identifiers
RewriteCond %{HTTP_USER_AGENT} ^.*(winhttp|HTTrack|clshttp|archiver|loader|email|harvest|extract|grab|miner).* [NC,OR]
# Block out  use of User Agent Strings containing references to specific crawler libraries
RewriteCond %{HTTP_USER_AGENT} ^.*(libwww-perl|curl|wget|python|nikto|scan).* [NC,OR]
# Block out  use of illegal or unsafe characters in the User Agent variable
RewriteCond %{HTTP_USER_AGENT} ^.*(<|>|'|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]
# Measures to block out  SQL injection attacks
RewriteCond %{QUERY_STRING} ^.*(;|<|>|'|"|\)|%0A|%0D|%22|%27|%3C|%3E|%00).*(/\*|union|select|insert|cast|set|declare|drop|update|md5|benchmark).* [NC,OR]
# Block out  reference to localhost/loopback/127.0.0.1 in the Query String
RewriteCond %{QUERY_STRING} ^.*(localhost|loopback|127\.0\.0\.1).* [NC,OR]
# Block out  use of illegal or unsafe characters in the Query String variable
RewriteCond %{QUERY_STRING} ^.*(<|>|'|%0A|%0D|%27|%3C|%3E|%00).* [NC]
*** ADD RULE HERE***
#
## End of commented Rewrite directives
#

The problem with this is you have all these rewrite conditions then at the end you don't have a rewrite rule. You need to add something like this:

Code:

# Send all blocked requests to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]

In the two spots where I placed *** ADD RULE HERE*** in the code block above.

-------------------------------------------------------------------------------------------

...also suggest a slight change to this line:
Code:

# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*(.*) [OR]

to this:
Code:

# Block out any script trying to base64_encode or base64_decode data via URL
RewriteCond %{QUERY_STRING} base64_(en|de)code[^(]*\([^)]*\) [OR]


Disco_Dave 03-22-2014 09:57 AM

Quote:

Originally Posted by bzcomputers (Post 2488879)
I noticed a couple issues at the bottom of the last two sections in the suggested .htaccess file:

Code:

# proc/self/environ? no way!
RewriteCond %{QUERY_STRING} proc/self/environ [OR]
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*(.*) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|[|\%[0-9A-Z]{0,2})
*** ADD RULE HERE***
##
##&nbsp; Commented version of Rewrite rules attributed to Ronald van den Heetkamp
##&nbsp; Comments by http://bodvoc.com
#
# Prevent use of specified methods in HTTP Request
RewriteCond %{REQUEST_METHOD} ^(HEAD|TRACE|DELETE|TRACK) [NC,OR]
# Block out use of illegal or unsafe characters in the HTTP Request
RewriteCond %{THE_REQUEST} ^.*(\\r|\\n|%0A|%0D).* [NC,OR]
# Block out use of illegal or unsafe characters in the Referer Variable of the HTTP Request
RewriteCond %{HTTP_REFERER} ^(.*)(<|>|'|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]
# Block out use of illegal or unsafe characters in any cookie associated with the HTTP Request
RewriteCond %{HTTP_COOKIE} ^.*(<|>|'|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]
# Block out use of illegal characters in URI or use of malformed URI
RewriteCond %{REQUEST_URI} ^/(,|;|:|<|>|">|"<|/|\\\.\.\\).{0,9999}.* [NC,OR]
# NOTE - disable this rule if your site is integrated with Payment Gateways such as PayPal
# Block out  use of empty User Agent Strings
RewriteCond %{HTTP_USER_AGENT} ^$ [OR]
# Block out  use of User Agent Strings beginning with java, curl or wget
RewriteCond %{HTTP_USER_AGENT} ^(java|curl|wget).* [NC,OR]
# Block out  use of User Agent Strings containing specific robot (crawler) identifiers
RewriteCond %{HTTP_USER_AGENT} ^.*(winhttp|HTTrack|clshttp|archiver|loader|email|harvest|extract|grab|miner).* [NC,OR]
# Block out  use of User Agent Strings containing references to specific crawler libraries
RewriteCond %{HTTP_USER_AGENT} ^.*(libwww-perl|curl|wget|python|nikto|scan).* [NC,OR]
# Block out  use of illegal or unsafe characters in the User Agent variable
RewriteCond %{HTTP_USER_AGENT} ^.*(<|>|'|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]
# Measures to block out  SQL injection attacks
RewriteCond %{QUERY_STRING} ^.*(;|<|>|'|"|\)|%0A|%0D|%22|%27|%3C|%3E|%00).*(/\*|union|select|insert|cast|set|declare|drop|update|md5|benchmark).* [NC,OR]
# Block out  reference to localhost/loopback/127.0.0.1 in the Query String
RewriteCond %{QUERY_STRING} ^.*(localhost|loopback|127\.0\.0\.1).* [NC,OR]
# Block out  use of illegal or unsafe characters in the Query String variable
RewriteCond %{QUERY_STRING} ^.*(<|>|'|%0A|%0D|%27|%3C|%3E|%00).* [NC]
*** ADD RULE HERE***
#
## End of commented Rewrite directives
#

The problem with this is you have all these rewrite conditions then at the end you don't have a rewrite rule. You need to add something like this:

Code:

# Send all blocked requests to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]

In the two spots where I placed *** ADD RULE HERE*** in the code block above.

-------------------------------------------------------------------------------------------

...also suggest a slight change to this line:
Code:

# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*(.*) [OR]

to this:
Code:

# Block out any script trying to base64_encode or base64_decode data via URL
RewriteCond %{QUERY_STRING} base64_(en|de)code[^(]*\([^)]*\) [OR]



I use this one also, I wonder if there's something in mine that stops my dbseocp panel taking me back to the ACP.....I need one you guys to may be run your eyes over mine :)

bzcomputers 03-22-2014 04:39 PM

Quote:

Originally Posted by Disco_Dave (Post 2488899)
I use this one also, I wonder if there's something in mine that stops my dbseocp panel taking me back to the ACP.....I need one you guys to may be run your eyes over mine :)

PM me a copy and I'll look at it.

tpearl5 03-31-2014 07:00 PM

remember, you really have no reason to use mod_deflate if your server is already set to use gzip.

final kaoss 03-31-2014 08:27 PM

You'll be just fine using mod_deflate. Just turn off vbulletin's gzip function otherwise, you'll be increasing load for no reason plus I don't believe vbulletins gzip feature covers everything.

Quote:

The mod_deflate module is similar to mod_gzip, but usable only with Apache v2. Early versions of mod_deflate provided lesser amount of compression than mod_gzip.[2] Starting with Apache 2.0.45, the compression level of mod_deflate is configurable using the DeflateCompressionLevel directive, so this difference disappeared.
A mod_gz module was independently developed by Ian Holsman. This module implements a gzip compression filter for Apache 2.0, providing similar functionality to mod_gzip. One important difference between the two modules is that mod_gzip includes its own gzip implementation, whereas mod_gz relies on an external zlib library.


All times are GMT. The time now is 06:46 AM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01248 seconds
  • Memory Usage 1,796KB
  • 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
  • (8)bbcode_code_printable
  • (1)bbcode_html_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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