{"id":2708,"date":"2012-03-21T23:29:15","date_gmt":"2012-03-21T23:29:15","guid":{"rendered":"https:\/\/supportex.net\/?p=2708"},"modified":"2019-05-10T17:00:38","modified_gmt":"2019-05-10T15:00:38","slug":"vbulletin-attachments-downloads-optimization","status":"publish","type":"post","link":"https:\/\/supportex.net\/blog\/2012\/03\/vbulletin-attachments-downloads-optimization\/","title":{"rendered":"vBulletin: attachments downloads optimization using vb-accelerator"},"content":{"rendered":"<p>By default\u00a0vBulletin uses PHP to deal with attachment downloads. It means that to provide a file from forum attachments to a user PHP process reads it and then starts to output it. This would work OK if you don&#8217;t have too much users. But if you do, attachments downloads from PHP could become one of performance bottlenecks. From the other hand, nginx allows to serve such files by itself if you backend issues <em>X-Accel-Redirect<\/em> header. If you are not familiar with it you might want to take a look at <a href=\"http:\/\/wiki.nginx.org\/XSendfile\">detailed description<\/a> on nginx wiki. \u00a0So, if you have nginx installed on your vBulletin box you could use <a href=\"https:\/\/github.com\/rcdesign\/vb-accelerator\">vb-accelerator<\/a> by Vitaly Puzrin for serving attachments by nginx. Like it&#8217;s mentioned in readme file, it intends to reduce server load and it really does. It will work \u00a0if you have Apache behind nginx as well. \u00a0Here is what you need to do to install it.<\/p>\n<p>1. Login to admin area of your \u00a0vBulletin.<\/p>\n<p>2. <a href=\"https:\/\/raw.github.com\/rcdesign\/vb-accelerator\/master\/product-vb_accelerator.xml\">Download<\/a> XML file from github to your local computer.<\/p>\n<p>3. Upload XML file to a server from <em>Plugins &amp; Products<\/em> menu item.<\/p>\n<p>4. Make sure your setting for an addon are correct. You can do it in <em>Settings\/Options<\/em>, item <em>VB Accelerator<\/em>.<\/p>\n<p>5. Configure nginx to enable \u00a0<em>X-Accel-Redirect<\/em>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">location ~* \/uploads\/(.*).thumb$ { \nexpires 24h; \n}<\/pre>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">location \/uploads {\nalias \/uploads;internal;\nexpires 24h;\nsendfile on;\n}<\/pre>\n<p>Note that in this case your thumb files will be accessible without authorization. After nginx reload it should start to server attachments by itself.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By default\u00a0vBulletin uses PHP to deal with attachment downloads. It means that to provide a file from forum attachments to a user PHP process reads it and then starts to output it. This would work OK if you don&#8217;t have too much users. But if you do, attachments downloads from PHP could become one of&hellip; <\/p>\n<div class=\"readmore-wrapper\"><a href=\"https:\/\/supportex.net\/blog\/2012\/03\/vbulletin-attachments-downloads-optimization\/\" class=\"more-link\">Read <\/a><\/div>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[152],"tags":[246,238,261,260],"class_list":["post-2708","post","type-post","status-publish","format-standard","hentry","category-linux","tag-nginx-en","tag-php-en","tag-vb-accelerator","tag-vbulletin"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>vBulletin: attachments downloads optimization using vb-accelerator &#8211; Supportex.NET blog<\/title>\n<meta name=\"description\" content=\"How to optimize downloads attachments in vBulletin using vb-accelerator. vBulletin vb-accelerator\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/supportex.net\/blog\/2012\/03\/vbulletin-attachments-downloads-optimization\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"vBulletin: attachments downloads optimization using vb-accelerator &#8211; Supportex.NET blog\" \/>\n<meta property=\"og:description\" content=\"How to optimize downloads attachments in vBulletin using vb-accelerator. vBulletin vb-accelerator\" \/>\n<meta property=\"og:url\" content=\"https:\/\/supportex.net\/blog\/2012\/03\/vbulletin-attachments-downloads-optimization\/\" \/>\n<meta property=\"og:site_name\" content=\"Supportex.NET blog\" \/>\n<meta property=\"article:published_time\" content=\"2012-03-21T23:29:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-05-10T15:00:38+00:00\" \/>\n<meta name=\"author\" content=\"Oleksii Tykhonov\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Oleksii Tykhonov\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/supportex.net\/blog\/2012\/03\/vbulletin-attachments-downloads-optimization\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/supportex.net\/blog\/2012\/03\/vbulletin-attachments-downloads-optimization\/\"},\"author\":{\"name\":\"Oleksii Tykhonov\",\"@id\":\"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/0690c26a0266603129fc15eae6243251\"},\"headline\":\"vBulletin: attachments downloads optimization using vb-accelerator\",\"datePublished\":\"2012-03-21T23:29:15+00:00\",\"dateModified\":\"2019-05-10T15:00:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/supportex.net\/blog\/2012\/03\/vbulletin-attachments-downloads-optimization\/\"},\"wordCount\":239,\"keywords\":[\"nginx\",\"php\",\"vb-accelerator\",\"vBulletin\"],\"articleSection\":[\"linux\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/supportex.net\/blog\/2012\/03\/vbulletin-attachments-downloads-optimization\/\",\"url\":\"https:\/\/supportex.net\/blog\/2012\/03\/vbulletin-attachments-downloads-optimization\/\",\"name\":\"vBulletin: attachments downloads optimization using vb-accelerator &#8211; Supportex.NET blog\",\"isPartOf\":{\"@id\":\"https:\/\/supportex.net\/blog\/en\/#website\"},\"datePublished\":\"2012-03-21T23:29:15+00:00\",\"dateModified\":\"2019-05-10T15:00:38+00:00\",\"author\":{\"@id\":\"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/0690c26a0266603129fc15eae6243251\"},\"description\":\"How to optimize downloads attachments in vBulletin using vb-accelerator. vBulletin vb-accelerator\",\"breadcrumb\":{\"@id\":\"https:\/\/supportex.net\/blog\/2012\/03\/vbulletin-attachments-downloads-optimization\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/supportex.net\/blog\/2012\/03\/vbulletin-attachments-downloads-optimization\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/supportex.net\/blog\/2012\/03\/vbulletin-attachments-downloads-optimization\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/supportex.net\/blog\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"vBulletin: attachments downloads optimization using vb-accelerator\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/supportex.net\/blog\/en\/#website\",\"url\":\"https:\/\/supportex.net\/blog\/en\/\",\"name\":\"Supportex.NET blog\",\"description\":\"Server and network management company\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/supportex.net\/blog\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/0690c26a0266603129fc15eae6243251\",\"name\":\"Oleksii Tykhonov\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4fd5f58002717075c88963469b9babef?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4fd5f58002717075c88963469b9babef?s=96&d=mm&r=g\",\"caption\":\"Oleksii Tykhonov\"},\"url\":\"https:\/\/supportex.net\/blog\/author\/oleksiitykhonov\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"vBulletin: attachments downloads optimization using vb-accelerator &#8211; Supportex.NET blog","description":"How to optimize downloads attachments in vBulletin using vb-accelerator. vBulletin vb-accelerator","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/supportex.net\/blog\/2012\/03\/vbulletin-attachments-downloads-optimization\/","og_locale":"en_US","og_type":"article","og_title":"vBulletin: attachments downloads optimization using vb-accelerator &#8211; Supportex.NET blog","og_description":"How to optimize downloads attachments in vBulletin using vb-accelerator. vBulletin vb-accelerator","og_url":"https:\/\/supportex.net\/blog\/2012\/03\/vbulletin-attachments-downloads-optimization\/","og_site_name":"Supportex.NET blog","article_published_time":"2012-03-21T23:29:15+00:00","article_modified_time":"2019-05-10T15:00:38+00:00","author":"Oleksii Tykhonov","twitter_misc":{"Written by":"Oleksii Tykhonov","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/supportex.net\/blog\/2012\/03\/vbulletin-attachments-downloads-optimization\/#article","isPartOf":{"@id":"https:\/\/supportex.net\/blog\/2012\/03\/vbulletin-attachments-downloads-optimization\/"},"author":{"name":"Oleksii Tykhonov","@id":"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/0690c26a0266603129fc15eae6243251"},"headline":"vBulletin: attachments downloads optimization using vb-accelerator","datePublished":"2012-03-21T23:29:15+00:00","dateModified":"2019-05-10T15:00:38+00:00","mainEntityOfPage":{"@id":"https:\/\/supportex.net\/blog\/2012\/03\/vbulletin-attachments-downloads-optimization\/"},"wordCount":239,"keywords":["nginx","php","vb-accelerator","vBulletin"],"articleSection":["linux"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/supportex.net\/blog\/2012\/03\/vbulletin-attachments-downloads-optimization\/","url":"https:\/\/supportex.net\/blog\/2012\/03\/vbulletin-attachments-downloads-optimization\/","name":"vBulletin: attachments downloads optimization using vb-accelerator &#8211; Supportex.NET blog","isPartOf":{"@id":"https:\/\/supportex.net\/blog\/en\/#website"},"datePublished":"2012-03-21T23:29:15+00:00","dateModified":"2019-05-10T15:00:38+00:00","author":{"@id":"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/0690c26a0266603129fc15eae6243251"},"description":"How to optimize downloads attachments in vBulletin using vb-accelerator. vBulletin vb-accelerator","breadcrumb":{"@id":"https:\/\/supportex.net\/blog\/2012\/03\/vbulletin-attachments-downloads-optimization\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/supportex.net\/blog\/2012\/03\/vbulletin-attachments-downloads-optimization\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/supportex.net\/blog\/2012\/03\/vbulletin-attachments-downloads-optimization\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/supportex.net\/blog\/en\/"},{"@type":"ListItem","position":2,"name":"vBulletin: attachments downloads optimization using vb-accelerator"}]},{"@type":"WebSite","@id":"https:\/\/supportex.net\/blog\/en\/#website","url":"https:\/\/supportex.net\/blog\/en\/","name":"Supportex.NET blog","description":"Server and network management company","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/supportex.net\/blog\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/0690c26a0266603129fc15eae6243251","name":"Oleksii Tykhonov","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4fd5f58002717075c88963469b9babef?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4fd5f58002717075c88963469b9babef?s=96&d=mm&r=g","caption":"Oleksii Tykhonov"},"url":"https:\/\/supportex.net\/blog\/author\/oleksiitykhonov\/"}]}},"_links":{"self":[{"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/posts\/2708","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/comments?post=2708"}],"version-history":[{"count":3,"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/posts\/2708\/revisions"}],"predecessor-version":[{"id":3147,"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/posts\/2708\/revisions\/3147"}],"wp:attachment":[{"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/media?parent=2708"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/categories?post=2708"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/tags?post=2708"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}