Results 1 to 9 of 9

Thread: How to insert image in Squid Error Pages

  1. #1
    Junior Member
    Join Date
    Mar 2010
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Smile How to insert image in Squid Error Pages

    hello all there ?

    i want to customize the squid error pages nd want to insert logo of my company in it...
    But Image is not loading during just the text is shown..... how i can troubleshoot this error ?... Please suggest ?

    Thanks
    Khurram

  2. #2
    Never say die nixcraft's Avatar
    Join Date
    Jan 2005
    Location
    BIOS
    Posts
    4,513
    Thanks
    17
    Thanked 804 Times in 511 Posts
    Rep Power
    10

    Default

    Do you store images in same directory or loading from remote web server? Did you edited correct file in /etc/squid/errors (RHEL specific).

    Here is an example of edited /etc/squid/error/ERR_FORWARDING_DENIED file. Note i've added the following code:
    HTML Code:
    <p><center><IMG SRC="http://figs.cyberciti.biz/nixcraft.com.logo.jpg" /></center></p>
    Here is a sample file
    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
    <TITLE>ERROR: The requested URL could not be retrieved</TITLE>
    <STYLE type="text/css"><!--BODY{background-color:#ffffff;font-family:verdana,sans-serif}PRE{font-family:sans-serif}--></STYLE>
    </HEAD><BODY>
    <p><center><IMG SRC="http://figs.cyberciti.biz/nixcraft.com.logo.jpg" /></center></p>
    <H1>ERROR</H1>
    
    
    <H2>The requested URL could not be retrieved</H2>
    <HR noshade size="1px">
    <P>
    While trying to retrieve the URL:
    <A HREF="%U">%U</A>
    <P>
    The following error was encountered:
    <UL>
    <LI>
    <STRONG>
    Forwarding Denied.
    </STRONG>
    </UL>
    
    <P>
    This cache will not forward your request because it is trying to enforce a
    sibling relationship.  Perhaps the client at %i is a cache which has been
    misconfigured.
    <P>Your cache administrator is <A HREF="mailto:%w">%w</A>.
    Last edited by nixcraft; 27th March 2010 at 01:49 PM.
    All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]


  3. The Following User Says Thank You to nixcraft For This Useful Post:

    Khurram (27th March 2010)

  4. #3
    Junior Member
    Join Date
    Mar 2010
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Smile

    hello,
    thankx for the quick reply, Yes i m storing the image in the same directory where the error pages are....!

    Thanks
    Khurram

  5. #4
    Never say die nixcraft's Avatar
    Join Date
    Jan 2005
    Location
    BIOS
    Posts
    4,513
    Thanks
    17
    Thanked 804 Times in 511 Posts
    Rep Power
    10

    Default

    Did you see my updated post? In that case add
    <p><center><IMG SRC="YOUR-LOGO.jpg" /></center></p>
    All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]


  6. The Following User Says Thank You to nixcraft For This Useful Post:

    Khurram (27th March 2010)

  7. #5
    Junior Member
    Join Date
    Mar 2010
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Smile

    thanks for this !

    sorry but could u pls explain path .... coz my image path is /usr/share/squid/errors/en/WALLPAPER.JPG

    how i will insert it in <IMG src="">

    <p><center><IMG SRC="YOUR-LOGO.jpg" /></center></p> is not working for me.... It just shows Text Error not image... is there any change i have to make in any of the file errror ?
    if so then pls guide me how i can nd what to write in it ?


    Thankx
    Khurram
    Last edited by Khurram; 27th March 2010 at 02:13 PM.

  8. #6
    Junior Member
    Join Date
    Mar 2010
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Here is my Access Denied File.....!

    <html>
    <center>
    <div>
    <img src="wallpaper.jpg"><br></div>
    <div>
    <font color="RED"><em>Access Deniedlease Contact <a href="mailto:admin@domain">Administrator</a> for more information.</em></font>
    </center>
    </div>
    </html>

    Wallpaper is in the same directory where Error Pages are.......Code is correct but image not showing in Error Pages to Clients.....

    Thankx
    Khurram
    Last edited by Khurram; 27th March 2010 at 02:58 PM.

  9. #7
    Never say die nixcraft's Avatar
    Join Date
    Jan 2005
    Location
    BIOS
    Posts
    4,513
    Thanks
    17
    Thanked 804 Times in 511 Posts
    Rep Power
    10

    Default

    I think it doesn't accept image from local dir. You need to have it from remote server. Try free image hosting and it should work.
    All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]


  10. #8
    Junior Member
    Join Date
    Mar 2010
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Smile

    Hello,

    I have tried hosting free image nd inserting path there but the problem is still there ....
    i dont know where is problem but i cant understand it still... U have any suggestion ?

    my code is now looking like this

    <html>
    <div style="text-align: center">
    <img src="freeimagehosting.net/uploads/e61f15f900.gif">
    <font color="RED"><em>Access Denied:- Please Contact <a href="mailto:admin@domain.com">Administrator</a> for more information.</em></font>
    </div>
    </html>


    Thanks
    Khurram
    Last edited by Khurram; 29th March 2010 at 02:08 PM.

  11. #9
    Member meta's Avatar
    Join Date
    Mar 2010
    Posts
    62
    Thanks
    19
    Thanked 5 Times in 4 Posts
    Rep Power
    5

    Default

    I'm no expert but use full http url path
    Code:
    http://freeimagehosting.net/uploads/e61f15f900.gif
    something like:
    HTML Code:
    <html>
    <center><img src="http://freeimagehosting.net/uploads/e61f15f900.gif"></center>
    <font color="RED"><em>Access Denied:- Please Contact <a href="mailto:admin@domain.com">Administrator</a> for more information.</em></font>
    
    </html>
    Do you acl to block access to test it? If not add it. Than restart the squid
    Code:
    service squid restart

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Viewing local pages.
    By fooboo in forum Linux software
    Replies: 11
    Last Post: 16th March 2010, 01:12 PM
  2. [Solved] Squid 2.7 Stable error - all not defined
    By bandcoach in forum Proxy Servers
    Replies: 3
    Last Post: 24th December 2009, 06:17 PM
  3. Squid Error
    By zakaferoz in forum Mail Servers
    Replies: 1
    Last Post: 12th February 2008, 04:05 AM
  4. squid/2.5.STABLE3 Error
    By ishu in forum Linux software
    Replies: 18
    Last Post: 10th August 2006, 06:08 AM
  5. Squid Error
    By rajuk in forum Linux software
    Replies: 4
    Last Post: 11th November 2005, 03:05 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •