RE: Tux and HTTP 302
"Nuno Ferreira" <[email protected]>
| Newsgroups | gmane.network.tux |
|---|---|
| Organization | Global TI, Lda |
| Message-ID | <[email protected]> |
My main objective is _precisely_ to prevent the installation of Apache. So bear with me, please. This server will only serve .html, .gif and .jpg for as long as he lives. It is being used by cache module. The problem is that when a file (in this case the problem are the image files, only) is not there Tux will return a http 404 and the cache module will misbehave. The cache module will behave very nicely if I can make Tux return a http 302 Yes, I know about Tux being extension-triggered, but how much will my performance (not to mention other potencial problems) suffer, compared to having Apache lying around *just* for this case, if I associate .gif and .jpg to my module, 'stat' the filename inside it and send back a 302 if it isn't there or ... ? I don't know exactly how to go about that 'or'. When the file exists, should the module send the object (the file) back to the client or can I drop the priviledge of handling that extension back to Tux's original behavior... ? All your thoughts are appreciated. TIA, Nuno > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of [email protected] > Sent: quinta-feira, 20 de Junho de 2002 18:26 > To: [email protected] > Subject: RE: Tux and HTTP 302 > > > > From: "Nuno Ferreira" <[email protected]> > > To: <[email protected]> > > Subject: Tux and HTTP 302 > > Date: Thu, 20 Jun 2002 12:16:00 +0100 > > Organization: Global TI, Lda > > Reply-To: [email protected] > > > I need to be able generate a HTTP 302 Found (redirection) from TUX. > > Does anyone know how to do this? > > Do I need to write a TUX module? > > Nuno, > > TUX modules are extension-triggered (.x and .tux by default; see > /etc/tux.mime.types). So while it would be trivial to create > a dynamic > module that set HTTP status 302 and the Location: header, it > could only be > triggered by a GET to that extension, i.e. > http://server/redirect.tux (which > I doubt is what you want). > > > My suggestion: set up Apache on port 8080 as a backend server > (see the TUX > docs for more info on how to do this) and use mod_alias. > When TUX can't > find the file, it will transparently pass the connection to Apache. > > David > > > > > >