Announcement

Collapse
No announcement yet.

Howto serve images from another location

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Howto serve images from another location

    Dear Srs,

    I am currently using 2 servers for my vBulletin forum, one is dedicated to MySQL 4 and the other one is running Apache2 + PHP5.

    Now I want to add another server to serve ONLY static content, images, banners, CSS, Javascript files, etc..

    But I dont want to use mod_proxy or similar to separate content.. I think that the better way is to use a DNS based system, something like:

    http://forum.com -> PHP
    http://images.forum.com -> Static Content

    It's possible by editing vBulletin templates.. but there are a lot of images and references, is there any simple method to make this process? What is the suggested method to separate content? Thanks!!

    Regards,

  • #2
    Your stylevars are set using the AdminCP...presumably it would be possible to set the directory to a full URL http://images.forum.com instead of a relative URL.

    Not sure though. If it's not you'll have to use .htaccess to rewrite all the image URLs instead.

    Comment


    • #3
      Yes.

      admin control panel > styles & templates > style manager > dropdown: style vars > instead of images/ enter http://images.yoursite.com/ as dir..

      Comment


      • #4
        Dear Srs,

        Thanks it works great.. but still are serving some images from this server:

        X- - [13/Mar/2007:13:03:39 +0100] "GET /images/gradients/gradient_tcat.gif HTTP/1.1" 200 3723
        X - - [13/Mar/2007:13:03:39 +0100] "GET /images/gradients/gradient_thead.gif HTTP/1.1" 200 2834
        X - - [13/Mar/2007:13:03:39 +0100] "GET /images/ranks/green_rank_3.gif HTTP/1.0" 200 216
        Greping for those image names in PHP/HTML appears nothing..

        There are smiles, icons, etc.. is there any easy way to view in what template are defined and change? I am searching in template management.. but do not appear nothing..

        Regards,

        Comment


        • #5
          Dear Srs,

          I have found a option in the control panel to change icons and smile URLs.

          But after make changes some images are still serving from "main" server (vagos.es instead of wf1.vagos.es)...

          Example of icons. This is the ouput of the content of the "icon" table:

          Code:
          mysql> SELECT * FROM icon;
          +--------+-------------+---------------------------------------------+-----------------+--------------+
          | iconid | title       | iconpath                                    | imagecategoryid | displayorder |
          +--------+-------------+---------------------------------------------+-----------------+--------------+
          |      1 | Post        | http://wf1.vagos.es/images/icons/icon1.gif  |               2 |            1 |
          |      2 | Arrow       | http://wf1.vagos.es/images/icons/icon2.gif  |               2 |            1 |
          |      3 | Lightbulb   | http://wf1.vagos.es/images/icons/icon3.gif  |               2 |            1 |
          |      4 | Exclamation | http://wf1.vagos.es/images/icons/icon4.gif  |               2 |            1 |
          |      5 | Question    | http://wf1.vagos.es/images/icons/icon5.gif  |               2 |            1 |
          |      6 | Cool        | http://wf1.vagos.es/images/icons/icon6.gif  |               2 |            1 |
          |      7 | Smile       | http://wf1.vagos.es/images/icons/icon7.gif  |               2 |            1 |
          |      8 | Angry       | http://wf1.vagos.es/images/icons/icon8.gif  |               2 |            1 |
          |      9 | Unhappy     | http://wf1.vagos.es/images/icons/icon9.gif  |               2 |            1 |
          |     10 | Talking     | http://wf1.vagos.es/images/icons/icon10.gif |               2 |            1 |
          |     11 | Red face    | http://wf1.vagos.es/images/icons/icon11.gif |               2 |            1 |
          |     12 | Wink        | http://wf1.vagos.es/images/icons/icon12.gif |               2 |            1 |
          |     13 | Thumbs down | http://wf1.vagos.es/images/icons/icon13.gif |               2 |            1 |
          |     14 | Thumbs up   | http://wf1.vagos.es/images/icons/icon14.gif |               2 |            1 |
          +--------+-------------+---------------------------------------------+-----------------+--------------+
          In the generated HTML code it's still harcoded relative path to the images.. here is an example:

          http://www.vagos.es/showthread.php?t=93194

          Extract of HTML code:

          Code:
          <img class="inlineimg" src="images/icons/icon1.gif" alt="Predeterminado" border="0" />
          The same problem with "smilie" and "rankimg".. it's posible to change completely this?

          Thanks!

          Comment


          • #6
            Ranks images problem solver by executing some SQL querys like this:

            Code:
            UPDATE usertextfield SET rank = "<img src=\"http://wf1.vagos.es/images/ranks/green_rank_2.gif\" alt=\"\" border=\"\" />" WHERE rank = "<img src=\"images/ranks/green_rank_2.gif\" alt=\"\" border=\"\" />" ;
            Regards,

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            X