Re: Error page server in Apache ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yes, definetly.

there is a variable called %{HTTP_HOST} which will be the hostname in the request.

And you can use that variable for example in mod_rewrite, and mod_rewrite can perfectly point to local filesystem paths too.

2016-11-04 9:01 GMT+01:00 Joe Muller <jmuller@xxxxxxxxxxx>:
Hi All,

 We currently have an old legacy Java application running under Sun Webservers that does the following.  It's purpose is to display an error message if a particular webserver is down.   The request is forwarded to the application from the load balancer when the load balancer detects the webserver is down.

1) Receives a request

2) Looks at the request URL (i.e. app1.domain.com, app2.domain.com, app3.domain.com )

3) Display a file from a directory based on the URL, i.e. /usr/local/apache2/htdocs/error/app1.domain.com/site_down.html

Is it possible to implement the above in Apache 2.4 using rewrite rules ?

Thanks,

-Joe




--
Daniel Ferradal
IT Specialist

email         dferradal at gmail.com

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux