Custom error pages

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Custom error pages

Omar M
Hello everyone:

I have two questions and I was wondering what could I do...

one: Is possible to use a css file with my error pages? I wanna give a
nice output these pages.

two: Could I load some pics? jpg or png? I wanna use my logo.

Of course I already tried both things and I couldn't. I can't use my
style.css file :S . And I can see the images even if I use full path.

Any idea would be great...

Regrets.

Omar M.

Reply | Threaded
Open this post in threaded view
|

Re: Custom error pages

Chris Robertson-2
Omar M wrote:
> Hello everyone:
>
> I have two questions and I was wondering what could I do...
>
> one: Is possible to use a css file with my error pages? I wanna give a
> nice output these pages.
>  

Yes.

> two: Could I load some pics? jpg or png? I wanna use my logo.
>  

Yes.

> Of course I already tried both things and I couldn't. I can't use my
> style.css file :S . And I can see the images even if I use full path.
>  

What do you mean by "full path"?  Using the path on the file system to
include images and/or CSS is not going to work (nor would it work on a
web server).  You need to host them on a web server and reference the
full URL.  Relative links won't work with Squid, though the referenced
elements will be cached if possible.

> Any idea would be great...
>
> Regrets.
>
> Omar M.
>  

Chris

Reply | Threaded
Open this post in threaded view
|

Re: Custom error pages

Henrik Nordström
ons 2007-05-16 klockan 14:50 -0800 skrev Chris Robertson:
> Omar M wrote:

> What do you mean by "full path"?  Using the path on the file system to
> include images and/or CSS is not going to work (nor would it work on a
> web server).  You need to host them on a web server and reference the
> full URL.  Relative links won't work with Squid, though the referenced
> elements will be cached if possible.

Well, it is technically possible to have Squid host them. Just requires
a little trickery in mime.conf.

After the last line in mime.conf, add dummy entries for your additional
files you'd like Squid to host. They will all be in the icons folder

  <a href="http://your.squid.server:port/squid-internal-static/icons/filename">http://your.squid.server:port/squid-internal-static/icons/filename

Regards
Henrik

signature.asc (316 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Custom error pages

Adrian Chadd
On Thu, May 17, 2007, Henrik Nordstrom wrote:

> ons 2007-05-16 klockan 14:50 -0800 skrev Chris Robertson:
> > Omar M wrote:
>
> > What do you mean by "full path"?  Using the path on the file system to
> > include images and/or CSS is not going to work (nor would it work on a
> > web server).  You need to host them on a web server and reference the
> > full URL.  Relative links won't work with Squid, though the referenced
> > elements will be cached if possible.
>
> Well, it is technically possible to have Squid host them. Just requires
> a little trickery in mime.conf.
>
> After the last line in mime.conf, add dummy entries for your additional
> files you'd like Squid to host. They will all be in the icons folder
>
>   <a href="http://your.squid.server:port/squid-internal-static/icons/filename">http://your.squid.server:port/squid-internal-static/icons/filename

Actually, I wrote an evil! article about this a while ago!

http://www.creative.net.au/evil/squid_error_image_pages.shtml

I'd put it into the Wiki but I don't really think its the type of thing
that we should have documented as 'Official'. Personally I'd just install
thttpd on a server, bind to an IP on port 80, and reference that..




Adrian

Reply | Threaded
Open this post in threaded view
|

Re: Custom error pages

Henrik Nordström
tor 2007-05-17 klockan 16:49 +0800 skrev Adrian Chadd:

> >   <a href="http://your.squid.server:port/squid-internal-static/icons/filename">http://your.squid.server:port/squid-internal-static/icons/filename
>
> Actually, I wrote an evil! article about this a while ago!
>
> http://www.creative.net.au/evil/squid_error_image_pages.shtml
>
> I'd put it into the Wiki but I don't really think its the type of thing
> that we should have documented as 'Official'. Personally I'd just install
> thttpd on a server, bind to an IP on port 80, and reference that..

Same here..

Regards
Henrik

signature.asc (316 bytes) Download Attachment