vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Board Optimization - vB Accelerator (https://vborg.vbsupport.ru/showthread.php?t=207566)

mindhunter77 05-20-2009 05:37 PM

Quote:

1. Check that thumbnails are accessible via www (type URL to any thumbnail in browres path). Browser should offer to download file or to show thumbnail (if youcared about mime type)
This is part of my issue, I got nginx running, that was pretty easy, but for some reason I can not access thumbs via the browser, I disabled vbseo attachments, chmod 777, but still no go.

Vitaly 05-20-2009 05:57 PM

I think, this page contains whe most actual resources, if you have troubles with nginx configuration:

http://nginx.net/

There are some links, where you can ask any questions about nginx in english.

mindhunter77 05-21-2009 05:11 PM

Everything seems to be working on my site now, it's just when I check the headers when I go to vist an image I get this

Code:

http://www.xxxxxxxx.com/forum/uploadedimages/1/38251.thumb?d=1236711928

Notice the
Code:

?d=1236711928
Does that mean it's not working and something is wrong?

Vitaly 05-21-2009 05:54 PM

Quote:

Originally Posted by mindhunter77 (Post 1814750)
Does that mean it's not working and something is wrong?

Thhat's ok. Don't care.

?d=XXX - timestamp, used to refresh browser cache, if you update image. It's generated by vB and left intact for compatibility reasons.

mindhunter77 05-21-2009 06:04 PM

ok great then, looks like I got this working...

I will try and help anyone else if I can, so if you have a question ask..

mindhunter77 05-21-2009 06:12 PM

Oh, by the way, vitaly I was able to still use vbseo on attachments as well =)

Vitaly 05-21-2009 07:26 PM

You mean, "attachments rewrite" vbseo options? I din't checked it at all, because don't use it (that option is off in my vbseo config).

Anyway, check twice, that your nginx config has separate "location" for thumbnails, and that this location stays before vbseo location. For example, you can temporary add deny rule for thumbnails location, to check that it's really catched.

vbseo php code should NOT be called for direct thumbnail links. Or you'll get no benefits from this mod.

Mod idea is:
- minimise php calls (no calls for thumbnails at all)
- minimise useless data transfer (can make sense for big attachments)

mindhunter77 05-21-2009 07:51 PM

It strange, I have rewrites enabled for attachments, yet everything works. My headers are showing that they are coming through as direct links like

Code:

http://www.xxxxxxxx.com/forum/uploadedimages/1/38251.thumb?d=1236711928
I must be doing something wrong then lol,

mindhunter77 05-21-2009 09:28 PM

vitaly,

can you think of a good way to tell if this is working? I disabled vbseo attachment rewrites, and it still appears to be working, thumbnails are showing up, but is there a way to test if it's actually doing what it's superposed to?

Vitaly 05-21-2009 09:49 PM

If you turned on "nginx acceleration option", then it's ok.

If you wish to check thumbnails - add "deny all" to thumbnails location from nginx config (see sample from first post). If thumbnails disappears - then all is ok, roll back your nginx config. If thumbnails still shown - then they goes via vbseo rewrite rules and you have to fix nginx config. See my previous recommendation.

The last way to check - turn mod off when server is loaded and check load difference. ~20% in my case. Of cause, if you have few attachments, there will be no difference at all.

VBSEO itself doesn't affect bebefits of this mod, if you've managed to get direct links to thumbnails and proper nginx config. But I've not checked combination with "attachments rewrite" option, so, can't comment if it conflicts with this mod or not.

MmS1 05-21-2009 10:14 PM

Thanks i have two problem
1 when i active this mod i can't download any files "attachments"

2 It's only for thumbs i mean is there any option to make it with other attachments i have a big Problem with attachments server load i have more then 60 user download attachments each One 20 mb and up to 40
Thats will help me alot

Vitaly 05-21-2009 10:43 PM

MmS1,

Do you use nginx webserver? I have no problems with full attachments (not thumbs), but this option work ONLY with nginx. With other webserver "nginx acceleration" must be disabled, see FAQ. Don't enable all mod options "just for fun", if you don't have nginx webserver.

If you use nginx, but full attaches can't be downloaded, check twice absolute path to directory (see config samples in FAQ)

Try to re-read FAQ and my explanations on previous page.

mindhunter77 05-21-2009 10:58 PM

This is the config I used when I had your mod working AND vBSEO attachment rewrites going. Now from the site, everything worked. In fact, load even when down. Yet I'm not sure if it's correctly working or not.

Notice I did not add your config options as this seemed to work.

Code:

server {
listen  80 default;
server_name www.xxxx.com xxxx.com;
server_name_in_redirect on;


location / {
root  /www/vhosts/xxxx.com/htdocs;
index index.php;
autoindex on;
access_log off;

}

location ~ \.php$ {
root          /www/vhosts/xxxx.com/htdocs;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_script_name;
include  fastcgi_params;
fastcgi_intercept_errors        on;
}


location /forum/ {

if (!-e $request_filename) {
rewrite ^/forum/(.*)$ /forum/vbseo.php last;
}

}
if ($request_filename ~ "\.php$" ) {
rewrite ^(.*)$ /forum/vbseo.php last;
}



location ~* \.(swf|pdf|ico|css|js|gif|jp?g|attach|thumb|png)(\?[0-9]+)?$ {
expires max;
root        /www/vhosts/xxx.com/htdocs;
}



location /status {
    stub_status on;
    access_log  off;
}

 }


Vitaly 05-21-2009 11:29 PM

At first glance, that can work :)

IMHO, there are no reasons to add "expires max". Very cheap economy, but potential problems with browser cache, if you upload new CSS for some mod and so on.

mindhunter77 05-21-2009 11:54 PM

ok, set at 30d; ??

Vitaly 05-22-2009 12:04 AM

No. Remove it at all.

mindhunter77 05-22-2009 01:52 AM

ok,

For those who want to test this mod with vBSEO still handling your attachments this is my working conf file nginx. This one is updated from the last one I posted and has some fixes. Keep in mind a few things.

1) In my conf where it says /thumbnails is not attachment thumbnails, I embed flv video on my site and this is where the flv thumbs go. You will not need this.

2) I placed this in the mod config area, and have both options set to YES.

Code:

/forum/uploadedimages
3) My server was running between 2.00 and 3.00 at all times before this mod, it now runs at 1.0 or less. I could probably get it even lower then that if I disabled the handling of attachments through vBSEO all together, but I get a lot of google image traffic and don't want to risk loss of ranks.

4) My forum gets about 50,000 unique per day, 90% of all threads contain pictures and video with picture thumbnails at 400px.



Code:

server {
listen  80 default;
server_name www.xxxx.com xxxx.com;
server_name_in_redirect on;



location / {
root  /www/vhosts/xxxx.com/htdocs;
index index.php;
autoindex on;
access_log off;

}

location ~ \.php$ {
root          /www/vhosts/xxxx.com/htdocs;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_script_name;
include  fastcgi_params;
fastcgi_intercept_errors        on;
}



location /forum/ {

if (!-e $request_filename) {
rewrite ^/forum/(.*)$ /forum/vbseo.php last;
}

}
if ($request_filename ~ "\.php$" ) {
rewrite ^(.*)$ /forum/vbseo.php last;
}


location /forum/uploadedimages {
root    /www/vhosts/xxxx.com/htdocs;
expires 24h;
}



location /forum/thumbnails {
root    /www/vhosts/xxxx.com/htdocs;
expires 24h;
}


location ~* ^.+\.(gif|png|ico|css|zip|tgz|gz|rar|pdf|bmp|js|swf) {
access_log  off;
expires 24h;
root        /www/vhosts/xxxx.com/htdocs;

        }


location /status {
    stub_status on;
    access_log  off;
}

 }


MmS1 05-22-2009 11:09 AM

Quote:

Originally Posted by Vitaly (Post 1814914)
MmS1,

Do you use nginx webserver? I have no problems with full attachments (not thumbs), but this option work ONLY with nginx. With other webserver "nginx acceleration" must be disabled, see FAQ. Don't enable all mod options "just for fun", if you don't have nginx webserver.

If you use nginx, but full attaches can't be downloaded, check twice absolute path to directory (see config samples in FAQ)

Try to re-read FAQ and my explanations on previous page.

Thanks alot but iam not running with nginx
I have hostshare is that oky i mean they can install nginx 4 me or not

My attachments path out forum path how can mange this

mydomain.com/vb this is my forum path
mydomain.com/vbatttatn this is my attachments path

mindhunter77 05-22-2009 04:41 PM

nginx is a webserver, for this to work 100% you need to be using nginx as your webserver, your host may not just switch that for you, you will have to ask them

MmS1 05-22-2009 07:51 PM

thanks i'll ask them
and about the path

My attachments path out side forum path how can mange this

mydomain.com/vb this is my forum path
mydomain.com/vbatttatn this is my attachments path

lebmedia 05-23-2009 03:13 AM

I Have A Question Before Installation
The Attachment And Albums And Blogs Stored In The FTP
But About The Thumbs ? From Where Can I Move Them To The FTP ?

mindhunter77 05-23-2009 03:52 AM

You need to have everything stored in the file system.. NOT in the database.

FTP has nothing to do with it.

MmS1 05-23-2009 11:09 AM

thanks i'll ask them
and about the path

My attachments path out side forum path how can mange this

mydomain.com/vb this is my forum path
mydomain.com/vbatttatn this is my attachments path
Edit/Delete Message Reply With Quote

lebmedia 05-24-2009 09:56 PM

Quote:

Originally Posted by mindhunter77 (Post 1815594)
You need to have everything stored in the file system.. NOT in the database.

FTP has nothing to do with it.

Yeah I Know That Man , I Mean By The FTP THe File System
but about the thumbs ?

mindhunter77 05-24-2009 10:06 PM

once you move the attachments to the file system, the thumbs will be placed there as well. You don't need to do anything separate for them, just make sure your attachments are served from the file system.

lebmedia 05-24-2009 10:33 PM

Quote:

Originally Posted by mindhunter77 (Post 1816498)
once you move the attachments to the file system, the thumbs will be placed there as well. You don't need to do anything separate for them, just make sure your attachments are served from the file system.

thanks so much mate for your help

lebmedia 05-24-2009 10:56 PM

1 Attachment(s)
Why The Attached Pictures Look Like This ??

Wen Uploading A Small Image To The Attachments t look Like This

https://vborg.vbsupport.ru/attachmen...3&d=1243209261

And Wen Upload A Big Pictures It Look Like This

https://vborg.vbsupport.ru/attachmen...4&d=1243209261

R-D 07-01-2009 11:02 AM

Works great for me.

I just switched from inline attachments to thumbnails, so this seemed like a logical step too. Lets just say anything that uses less server resources is a huge plus in my book.

Added this to my .htaccess to prevent .attach viewing on an Apache server. Seems to work fine.
Code:

RewriteCond %{REQUEST_FILENAME} \.attach [NC]
RewriteRule ^.* - [F,L]


Thanks for the modification, Vitaly!

Fenriz 10-11-2009 09:52 PM

Do I need to "Enable large downloads acceleration" if I have nginx as a frontend and apache as a backend?

Vitaly 10-11-2009 11:00 PM

Probably, that will work. Try to enable. I haven't tested such combination.

zyadalseef 11-06-2009 03:05 PM

thank u
I will rty it

R-D 11-14-2009 04:05 PM

The nginx part of this mod also works perfectly if you run nginx as a reverse proxy, with an Apache backend, even if Apache handles your PHP files.

After some basic nginx configuration (listed in post #2), it's very good to be able to let nginx handle the attachments instead of Apache. With attachments and all my static files now handled by nginx, a very basic VPS now goes a lot faster.

love. 11-14-2009 07:12 PM

thanks

MmS1 11-25-2009 04:03 PM

Again can this hack work with cpanel
Is there any way this hack work with files lika thumb

PossumX 11-30-2009 08:50 PM

Any chance of this mod being updated for vB 4.0 when the time comes?

Vitaly 01-22-2010 02:57 PM

Quote:

Originally Posted by PossumX (Post 1923214)
Any chance of this mod being updated for vB 4.0 when the time comes?

All my mods will certently be updated for 4.0. At least, because I have to migrate myself :) . I think, that will take 3-4 months, because 4.0 must become stable, and i have a lot of code to convert for 4.0.

Rafa-el 03-12-2010 12:19 PM

Does this plugin work for vB 3.8.5?

Vitaly 03-12-2010 04:56 PM

I did't upgraded my 3.8.4 yet. But don't expect problems with 3.8.5

magmf 05-28-2010 09:01 PM

do you have anything for vbulletin 4 ?

mindhunter77 09-24-2012 07:17 PM

Wouldn't this be useful for other areas? I know it covers thumbs, but what about any folder that has strictly static files, wouldn't it be best to have nginx serving those as well? I mean my style folder has hundreds of images that I would assume could benefit from something like this as well?


All times are GMT. The time now is 10:21 PM.

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.01293 seconds
  • Memory Usage 1,830KB
  • 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
  • (7)bbcode_code_printable
  • (6)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
  • (40)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