vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Board Optimization - United-Forum CSS Sprites - ludicrous speed - NOW! (https://vborg.vbsupport.ru/showthread.php?t=266696)

Mooff 07-21-2011 07:02 PM

You probably do not have GD installed on your server.

giorgino 07-21-2011 07:35 PM

Quote:

Originally Posted by Osbes (Post 2223020)
Hello giorgino,
i haven't added anything in connection to the attachment-system in this addon, so i didnt belive, that this problem has to do anything with it.


as far as i can see, you are using nginx and vbseo rewrite for attachments? an am i correct, that you problem is, that attachment-urls like http://www.propit.it/attachments/f66...-.4.09-005.jpg resolve into an 404 error? since our forum use nginx and vbseo too, i think i can help you anyway.

vbseo will rewirte the url of yout attachments to something like "attachments/f66/372d1280162113-firma-nostro-libro-ospiti-stlegdv14-1-1-.4.09-005.jpg". in our nginx configuration, nginx deliver jpeg directly and doesnt check each time if they exists, so it could use vbseo if it didnt exists.
since we didnt wanted to change this behavior of nginx we drop the rewrite of attachments with vbseo. hope this could help you.

Best regards
Sebastian

Hi Sebastian you're right. We've nginx with some difficult in configuration... (cry).
I don't understand your super nice help (my english is really poor, sorry for this) and I ask you for extended suggestions

final kaoss 07-21-2011 09:42 PM

Disable attachment rewriting in vbseo. How can you not understand that?

Quote:

drop the rewrite of attachments with vbseo
Quote:

Originally Posted by giorgino (Post 2223335)
Hi Sebastian you're right. We've nginx with some difficult in configuration... (cry).
I don't understand your super nice help (my english is really poor, sorry for this) and I ask you for extended suggestions


Makaveli007 07-21-2011 10:03 PM

Quote:

Originally Posted by Mooff (Post 2223319)
You probably do not have GD installed on your server.


you are correct sir. thanks. resolved

giorgino 07-22-2011 05:44 AM

Quote:

Originally Posted by extreme-gaming (Post 2223368)
Disable attachment rewriting in vbseo. How can you not understand that?

Great! Thank you, work perfect!

Osbes 07-22-2011 07:33 AM

Hi giorgino,

the commenly wrong assumption when working with nginx is, that every matching location directives will executed. Nginx will in general execute only one location directive.

Quote:


To summarize, the order in which directives are checked is as follows:

Directives with the "=" prefix that match the query exactly. If found, searching stops.
All remaining directives with conventional strings. If this match used the "^~" prefix, searching stops.
Regular expressions, in the order they are defined in the configuration file.
If #3 yielded a match, that result is used. Otherwise, the match from #2 is used.

So if your nginx configuration looks like (http://www.axivo.com/community/threa...letin-3.123/):

Code:

location / {
    try_files        $uri $uri/ @vbseo;
}

location @vbseo {
    fastcgi_pass        127.0.0.1:9000;
    fastcgi_param        SCRIPT_FILENAME    $document_root/vbseo.php;
    fastcgi_param        QUERY_STRING    vbseourl=$request_uri;
    include            fastcgi_params;
    internal;
}

location ~ \.(jpg|jpeg|png|gif|ico) {
    add_header        Cache-Control public;
    add_header        Cache-Control must-revalidate;
    expires          7d;
    access_log        off;
}

and you want to access an vbseo rewrite attachment url like http://www.propit.it/attachments/f66...-.4.09-005.jpg the executed location directive will be

Code:

location ~ \.(jpg|jpeg|png|gif|ico) {
    add_header        Cache-Control public;
    add_header        Cache-Control must-revalidate;
    expires          7d;
    access_log        off;
}

Since this doenst call vbseo.php the url will not resolve in the correct attachment url and you get an 404 http error.


So you could either extend your nginx configuration to always use try_files and then call vbseo.php as fallback, or you disable the rewrite of attachments with vbseo.

On our Forum we disabled this rewrite, cause the gain of this is - for us - lower than the gain of performance, since using try_files for every file isnt that good.

Best regards
Sebastian

giorgino 07-22-2011 07:52 AM

Hi sebastian since you're so kind, I try to take advantage of your expertise.

This is my .conf

Code:

server {
        listen  80;
        server_name www.mysite.it mysite.it;
        access_log /var/log/nginx/it.mysite.www.log;
        error_log  /var/log/nginx/err_it.mysite.www.log;
 
        root  /store1/www/it.mysite.www/doc_root;
        index  index.html index.htm index.php;
       
        #
        # Setup Expire
        #
        location ~* \.(jpg|jpeg|gif|css|png|js|ico)$ {
        root /store1/www/it.mysite.www/doc_root;
        access_log off;
        expires 30d;
    }

        #
        # Inizio Direttive per vBulletin/vBSEO
        #
       
        location ~ \.php$ {
                fastcgi_pass 127.0.0.1:9000;
                #fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param SCRIPT_FILENAME $document_root/vbseo.php;               
                include fastcgi_params;
        }
       
        location / {
          rewrite (sitemap_.*\.xml\.gz) /vbseo.php?vbseourl=vbseo_sitemap/vbseo_getsitemap.php&sitemap=$1 last;
          try_files $uri $uri/ /vbseo.php?$args;
        }
       
        location /vbseo/(includes|resources/html|resources/xml)/ {
        allow      127.0.0.1;
        deny      all;
        }
       
        location ~ /admincp/
        {
                index  index.php index.html;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;
                if ($uri ~ \.php)
                {
                        fastcgi_pass 127.0.0.1:9000;
                }
                break;
        }
       
        # --- fine
}


Mooff 07-23-2011 07:59 AM

Version 0.6.3 (23.07.2011)
  • Added the possibility to use TMS for automatic template modification.
  • Icons can now be merged into different sprites and css rollups instead of one big sprite.
  • Addon is now compatible with vBulletin 4.1.x
New template edits:
  • None

giorgino 07-23-2011 08:23 AM

Hi Mooff which template changes from 0.6.2 -> 0.6.3?
How upgrade? Simply overwrite files and rebuild sprites?

Osbes 07-23-2011 08:35 AM

Hi giorgino,

There are no template changes from 0.6.2 -> 0.6.3.

If you want to Upgrade from 0.6.2 -> 0.6.3, simply overwrite files, reinstall the addon (simply upload XML-product file with overwrite) and rebuild sprite.

If you want to switch from maually template changes to automatic template changes, there is additional work to be done:
  • install the Template Modification System
  • undo the template changes you did for sprites
  • reinstall this addon (simply upload XML-product file with overwrite).

Now your Templates are automatic changed. This will help you in the next versions, since the upcomming template changes will also be done automatically.


I would advise to do it now, before more template modification need to be done.

Best regards
Sebastian

PS:
I will look into your nginx configuration later :)


All times are GMT. The time now is 02:40 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.01536 seconds
  • Memory Usage 1,761KB
  • 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
  • (3)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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