Re: standard error page per virtual host
Lars Täuber <[email protected]> Fri, 14 May 2010 09:33:41 +0200
| Newsgroups | gmane.network.mathopd |
|---|---|
| Organization | Berlin-Brandenburgische Akademie der Wissenschaften |
| Message-ID | <[email protected]> |
Hallo Juergen, Juergen Daubert <[email protected]> schrieb: > On Wed, May 12, 2010 at 02:04:27PM +0200, Lars T=C3=A4uber wrote: > > Hi there! >=20 > Hello, >=20 > >=20 > > I'm new to mathopd but I thought it could serve all my wishes. > >=20 > > The question is: Does mathopd support setting standard error pages? >=20 > Yes, see http://www.mathopd.org/wiki?ErrorFile thanks alot. That is exactly what i was looking for. >=20 > > I have a small energy saving webserver that still runs when all other= =20 > > webservers are shut down due to power out. This server is backuped by= an ups. > > It will be configured to take over the ip addresses of the shut down=20 > > webservers and should serve a single static webpage for each virtual = host=20 > > configuration. > >=20 > > The question is can mathopd redirect all requests to a single html fi= le? > >=20 > > e.g. > >=20 > > http://abc.domain.org/xyz/file.html=20 > > should not generate a 404 error page but reply the standard file: > > /srv/www/abc.domain.org/index.html >=20 > Setup virtual hosts and use the Error404File directive within a Control > block: >=20 > Virtual { > Control {=20 > Host abc.domain.org > Alias / > Location /srv/www/abc.domain.org/index.html > Error404File /srv/www/abc.domain.org/index.html > } > } Thanks for this too. Is shortens my reading time significantly. > Unfortunately you have to do that for every host, because Error404File > cannot expand the * wildcard like Location does, see the Location > wiki-page to see what I mean: http://www.mathopd.org/wiki?Location This is not a problem, because every domain uses a different file. best regards Lars > One possibility to solve this might be to use a CGI script insatead of=20 > a static page for Error404File that reads the REQUEST_URI environment=20 > variables and redirects the user to the right error-page.=20 > See http://www.mathopd.org/wiki?CGI/EnvironmentVariables >=20 >=20 > HTH and regards > Juergen >=20 > --=20 > Juergen Daubert | mailto:[email protected] =20 --=20 Informationstechnologie Berlin-Brandenburgische Akademie der Wissenschaften J=C3=A4gerstrasse 22-23 10117 Berlin Tel.: +49 30 20370-352 http://www.bbaw.de