Hi,
I have setup a reverse proxy server which will route the request to
Server B. Proxy server is working well with Server B.
I would like to catch HTTP status error like 404/500 from server B. If my proxy gets error404/500 from Server B then it will redirect the page to other site, using PHP. For this reason, I set ErrorDocument 404/500 on httpd.conf file in reverse proxy
server to catch error from Server B. But ErrorDocument is not
working at all. it is working only if I request local file (in proxy server).
I would be glad if you kindly advise me how do I catch HTTP
status error code from Server B and redirect to custom error
page with requested url, using PHP.
Thanks
5 2871 pbmods 5,821
Recognized Expert Expert
Heya, kokababu.
How are you sending the requests? Are you using cURL?
Hi,
I am not using cURL. I have set Proxypass and ProxyPassRevers e
in httpd.conf file in my proxy server, let it is called proxyA.
I have also set a "ErrorDocum ent 404 /senderror.php" in httpd.conf file in proxyA.
I tested with wrong file name (like: http://www.proxyA.com/path/1111.html),
1111.html is not in server B so I should get 404 error and ErrorDocument will redirect to senderror.php file but it is not working.
How do I catch this error and redirect to PHP file with requested URL from proxy server.
Thanks
pbmods 5,821
Recognized Expert Expert
Thank you, pbmods. I have played with it and it is working.
pbmods 5,821
Recognized Expert Expert
Glad to hear you got it working! Good luck with your project, and if you ever need anything, post back anytime!
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Raymond Hettinger |
last post by:
Here is a discussion draft of a potential PEP.
The ideas grew out of the discussion on pep-284.
Comments are invited. Dart throwing is optional.
Raymond Hettinger
-------------------------------------------------------------
PEP: 323
|
by: Raymond Hettinger |
last post by:
Please comment on the new PEP for reverse iteration methods.
Basically, the idea looks like this:
for i in xrange(10).iter_backwards(): # 9,8,7,6,5,4,3,2,1,0
<do something with i>
The HTML version is much more readable than the ReST version.
See:
http://www.python.org/peps/pep-0322.html
|
by: aspguru |
last post by:
I have been hunting around recently for reverse proxy solutions to
work with IIS. An example use for this would be to put outlook web
access on your multi host IIS box on port 80 or an application like
sitecope on IIS's port 80. There are many 3rd party solutions below
some including ISAPI filters.
http://www.at32.com/doc/rproxy.htm
http://www.isapirewrite.com/
http://www.octagate.com/
|
by: A.M |
last post by:
Hi,
We are developing ADP.NET applications and one of our requirements is
implementing a Reverse Proxy on IIS.
I have couple of questions about Reverse Proxy:
|
by: bart |
last post by:
Hello,
We have a web service running on IIS (running on port 8080) that is behind
an apache web server (running on port 80) with reverse proxy to the IIS.
Accessing the webservice with the url http://ourhost/webservice.asmx?wsdl
works fine (in browser). However, the urls described by the wsdl contain
port specifications, in this case port 8080. Since our server is listening
on port 80 and blocks all traffic on port 8080, the client c#...
| |
by: =?Utf-8?B?a2NtYXJzaGFsbC5tc3A=?= |
last post by:
We're working on an app that will be integrated with another web app through
a reverse proxy. Our aspx pages will appear in an IFrame from their site and
will appear to the client browser as originating from the other app's domain.
Through use of relative URLs we've believe we have links working from page
to page. The problem we've discovered is with javascript, etc. emitted by
WebResource.axd links. All of these links seem to be...
|
by: Dave Mathew |
last post by:
I'm attempting to write a reverse proxy in ASP.Net which will catch
requests to my server in ASP.Net, perform some actions, and then get
the desired resource off another server to return to the original
client (using HttpWebRequest and rewriting it's response to my ASP.Net
client). I'm able to get the reverse proxy to work for html pages but
it's not working for images. Right now the code I'm playing with is
similar to this:
void...
|
by: Jane Parker |
last post by:
I read with interest the recent posting about Reverse Proxies and wondered
if it is possible to mix static and dynamic content.
If you have a lot of static content on your site it would make sense to keep
it outside the network, and only use the reverse proxy when making dynamic
data calls, but how could that actually work in practise? Is it possible to
mix it up like this?
|
by: =?Utf-8?B?d2FsdGVy?= |
last post by:
Hi there... I am stuck here ,and wish you could help. We have a webservice
proxy, since we are moving to WCf , we will want to re-generate a new proxy.
The problem is we do not own the service and ,worse, no WDSL available for us.
I know JAVA world can reverse engineer proxy back to WSDL. I wish you could
help me to find the similar thing in .NET.
Welcome any inspiring thought.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |