{"id":2707,"date":"2014-06-25T18:18:12","date_gmt":"2014-06-25T16:18:12","guid":{"rendered":"https:\/\/supportex.net\/?p=2707"},"modified":"2019-05-10T15:45:24","modified_gmt":"2019-05-10T13:45:24","slug":"vbulletin-attachments-service-optimization-vb-accelerator","status":"publish","type":"post","link":"https:\/\/supportex.net\/blog\/2014\/06\/vbulletin-attachments-service-optimization-vb-accelerator\/","title":{"rendered":"vBulletin: attachments service 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 to much users. But if you do attachments downloads from PHP could become one of bottlenecks. From the other hand, nginx allows to serve such files by itself if you backend issues\u00a0<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\u00a0<a href=\"https:\/\/github.com\/rcdesign\/vb-accelerator\">vb-accelerator<\/a> by\u00a0Vitaly Puzrin for serving attachments by nginx. 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>5. Make sure your setting for an addon are correct. You can do it in\u00a0<em>Settings\/Options<\/em>, item <em>VB Accelerator<\/em>.<\/p>\n<p>6. Configure <em>nginx<\/em> to enable \u00a0<em>X-Accel-Redirect<\/em>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">location ~* \/uploads\/(.*).thumb$ {\nexpires 24h;\n}\n\nlocation \/upoads {\nopen_file_cache max=1024 inactive=600s;\nopen_file_cache_valid 2000s;\nopen_file_cache_min_uses 1;\nopen_file_cache_errors on;\nalias \/upoads;\ninternal;\nexpires 24h;\nsendfile on;\n}<\/pre>\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 to 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\/2014\/06\/vbulletin-attachments-service-optimization-vb-accelerator\/\" 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":[],"class_list":["post-2707","post","type-post","status-publish","format-standard","hentry","category-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>vBulletin: attachments service optimization using vb-accelerator &#8211; Supportex.NET blog<\/title>\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\/2014\/06\/vbulletin-attachments-service-optimization-vb-accelerator\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"vBulletin: attachments service optimization using vb-accelerator &#8211; Supportex.NET blog\" \/>\n<meta property=\"og:description\" content=\"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 to much users. But if you do attachments downloads from PHP could become one of&hellip; Read\" \/>\n<meta property=\"og:url\" content=\"https:\/\/supportex.net\/blog\/2014\/06\/vbulletin-attachments-service-optimization-vb-accelerator\/\" \/>\n<meta property=\"og:site_name\" content=\"Supportex.NET blog\" \/>\n<meta property=\"article:published_time\" content=\"2014-06-25T16:18:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-05-10T13:45:24+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\/2014\/06\/vbulletin-attachments-service-optimization-vb-accelerator\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/supportex.net\/blog\/2014\/06\/vbulletin-attachments-service-optimization-vb-accelerator\/\"},\"author\":{\"name\":\"Oleksii Tykhonov\",\"@id\":\"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/0690c26a0266603129fc15eae6243251\"},\"headline\":\"vBulletin: attachments service optimization using vb-accelerator\",\"datePublished\":\"2014-06-25T16:18:12+00:00\",\"dateModified\":\"2019-05-10T13:45:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/supportex.net\/blog\/2014\/06\/vbulletin-attachments-service-optimization-vb-accelerator\/\"},\"wordCount\":197,\"articleSection\":[\"linux\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/supportex.net\/blog\/2014\/06\/vbulletin-attachments-service-optimization-vb-accelerator\/\",\"url\":\"https:\/\/supportex.net\/blog\/2014\/06\/vbulletin-attachments-service-optimization-vb-accelerator\/\",\"name\":\"vBulletin: attachments service optimization using vb-accelerator &#8211; Supportex.NET blog\",\"isPartOf\":{\"@id\":\"https:\/\/supportex.net\/blog\/en\/#website\"},\"datePublished\":\"2014-06-25T16:18:12+00:00\",\"dateModified\":\"2019-05-10T13:45:24+00:00\",\"author\":{\"@id\":\"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/0690c26a0266603129fc15eae6243251\"},\"breadcrumb\":{\"@id\":\"https:\/\/supportex.net\/blog\/2014\/06\/vbulletin-attachments-service-optimization-vb-accelerator\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/supportex.net\/blog\/2014\/06\/vbulletin-attachments-service-optimization-vb-accelerator\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/supportex.net\/blog\/2014\/06\/vbulletin-attachments-service-optimization-vb-accelerator\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/supportex.net\/blog\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"vBulletin: attachments service 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 service optimization using vb-accelerator &#8211; Supportex.NET blog","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\/2014\/06\/vbulletin-attachments-service-optimization-vb-accelerator\/","og_locale":"en_US","og_type":"article","og_title":"vBulletin: attachments service optimization using vb-accelerator &#8211; Supportex.NET blog","og_description":"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 to much users. But if you do attachments downloads from PHP could become one of&hellip; Read","og_url":"https:\/\/supportex.net\/blog\/2014\/06\/vbulletin-attachments-service-optimization-vb-accelerator\/","og_site_name":"Supportex.NET blog","article_published_time":"2014-06-25T16:18:12+00:00","article_modified_time":"2019-05-10T13:45:24+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\/2014\/06\/vbulletin-attachments-service-optimization-vb-accelerator\/#article","isPartOf":{"@id":"https:\/\/supportex.net\/blog\/2014\/06\/vbulletin-attachments-service-optimization-vb-accelerator\/"},"author":{"name":"Oleksii Tykhonov","@id":"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/0690c26a0266603129fc15eae6243251"},"headline":"vBulletin: attachments service optimization using vb-accelerator","datePublished":"2014-06-25T16:18:12+00:00","dateModified":"2019-05-10T13:45:24+00:00","mainEntityOfPage":{"@id":"https:\/\/supportex.net\/blog\/2014\/06\/vbulletin-attachments-service-optimization-vb-accelerator\/"},"wordCount":197,"articleSection":["linux"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/supportex.net\/blog\/2014\/06\/vbulletin-attachments-service-optimization-vb-accelerator\/","url":"https:\/\/supportex.net\/blog\/2014\/06\/vbulletin-attachments-service-optimization-vb-accelerator\/","name":"vBulletin: attachments service optimization using vb-accelerator &#8211; Supportex.NET blog","isPartOf":{"@id":"https:\/\/supportex.net\/blog\/en\/#website"},"datePublished":"2014-06-25T16:18:12+00:00","dateModified":"2019-05-10T13:45:24+00:00","author":{"@id":"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/0690c26a0266603129fc15eae6243251"},"breadcrumb":{"@id":"https:\/\/supportex.net\/blog\/2014\/06\/vbulletin-attachments-service-optimization-vb-accelerator\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/supportex.net\/blog\/2014\/06\/vbulletin-attachments-service-optimization-vb-accelerator\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/supportex.net\/blog\/2014\/06\/vbulletin-attachments-service-optimization-vb-accelerator\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/supportex.net\/blog\/en\/"},{"@type":"ListItem","position":2,"name":"vBulletin: attachments service 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\/2707","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=2707"}],"version-history":[{"count":2,"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/posts\/2707\/revisions"}],"predecessor-version":[{"id":3131,"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/posts\/2707\/revisions\/3131"}],"wp:attachment":[{"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/media?parent=2707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/categories?post=2707"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/tags?post=2707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}