Sponsored Content
Top Forums Web Development Copy and forward apache http request Post 302425757 by JCR on Saturday 29th of May 2010 10:41:38 PM
Old 05-29-2010
Copy and forward apache http request

Hello,

I am using apache 2.2 and I need to have certain http requests (those including example.com for instance) to be executed normally and forwarded to another server.

With mod_rewrite, I could easily forward but then the input request would not be executed on my server. Right?

Am I missing something? Any idea on how to forward/copy an http request?

Many thanks
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

unix script http request

Hi everybody, I have a *.vbs file which I want to run automatically. I want to know if there is anyway to implement the given example for e.g "http://255.255.255.55/script.vbs" what I mean is does anyone know how to make an http request from a unix script?? Thanks in advance!!!!!!!!!!! (1 Reply)
Discussion started by: arksal
1 Replies

2. Shell Programming and Scripting

Http request in Linux

Hi, i need a guide how to write a script which i can do a http request. Let say the request look like below; http://www.test.com?txid=1&type=service&server=linux I have a list of "txid" (in *.txt) and need to run all "txid" acordingly. So that mean, every transaction i have to refer "txid"... (7 Replies)
Discussion started by: malaysoul
7 Replies

3. UNIX for Dummies Questions & Answers

http request forward

Hi, Maybe it's a stupid question, anyway here goes.. I have an Apache web server on Solaris box, let's say A, with a public ip and a web application on a Linux box, uhmmm B, on a private lan with a private ip. I want the people from outside to connect to the app, but its inside the lan,... (4 Replies)
Discussion started by: piltrafa
4 Replies

4. UNIX for Dummies Questions & Answers

HTTP request

Can anybody tell about http request processing in shell script..? (3 Replies)
Discussion started by: noufal
3 Replies

5. UNIX for Dummies Questions & Answers

cant make a http get request using wget

Hi all, Im trying to make an http get request to a web service from a linux machine like below and i get ERROR 500 wget http://10.1.21.236:8585/pns.asmx/Sen...&msgBody=werty 25018 $ --19:06:32-- http://10.1.21.236:8585/pns.asmx/Sen...erName=serverA Connecting to 10.1.21.236:8585...... (1 Reply)
Discussion started by: elthox
1 Replies

6. Web Development

Apache: Forward Proxy Via Virtualhost

I've set up a forward proxy within a VirtualHost (see below) on Apache 2.2.11. I then browse using mydomain.com:80 as the proxy - I've also tried using the IP address of the VirtualHost xxx.xxx.xxx.xxx:80. It works fine, the only problem is that in both cases the server's main IP address is always... (2 Replies)
Discussion started by: krunksta
2 Replies

7. Programming

C++ http GET request using sockets

Hello I am trying to communicate with a server that is ready to accept HTTP GET requests and send back data per the request. However, I have very little experience in socket programming and I don't really know how to debug this. Googling on the web hasn't yielded much, except people saying I... (2 Replies)
Discussion started by: flagman5
2 Replies

8. Shell Programming and Scripting

http request

I am running a website but I still have problems with the "service temporarily unavailable error". I want to make a simple check if the website is up and running. Does anybody has an idea how to do it? (the site is password protected, so you have to add a user and pwd before logging in). ... (2 Replies)
Discussion started by: jurgen
2 Replies

9. Shell Programming and Scripting

Parsing the http post request

Hi, I am trying to write a shell script to parse the post request data that it received to a xml file. Below is the post request data that script is receiving. -----------------------------7dd2339190c8e Content-Disposition: form-data; name="param1" 1... (2 Replies)
Discussion started by: jdp
2 Replies
DACS_UPROXY(8)						     DACS Web Services Manual						    DACS_UPROXY(8)

NAME
dacs_uproxy - minimal HTTP proxying SYNOPSIS
dacs_uproxy [dacsoptions[1]] DESCRIPTION
This web service is part of the DACS suite. The dacs_uproxy web service accepts an incoming HTTP request (the initial request), then reissues a nearly identical HTTP request to a different URL (the proxied request) and returns its unaltered response. The initial request must use either the GET or POST HTTP method; the proxied request will use the same method as the initial request. Note that the origin server (the web server that receives the proxied request) will see a request that originates at the host that runs dacs_uproxy, not the host that issues the initial request. When run on a firewall host, the program can be useful for forwarding incoming requests to interior hosts. An origin server does not need to be running DACS. All access control is performed by the jurisdiction that runs dacs_uproxy. Similarly, the program can be useful for forwarding requests that originate behind the firewall, subject to access control permission. dacs_uproxy is not a transparent proxy server. A request URL must be explicitly addressed to it and include a (partial) name for the target resource. Security The program must be configured with care because it can expose otherwise inaccessible hosts to arbitrary HTTP requests from any source that can connect to dacs_uproxy. Particular care must be taken if a program that is invoked by dacs_uproxy generates a redirect that may be handled internally by the program's web server. In this event the new request arising from the redirection will not automatically be subjected to access control because the new request does come through dacs_uproxy. Therefore, local redirects must be avoided by proxied web services, resources that might be invoked through a local redirect must be publicly accessible, or authorization checking must somehow be arranged for these resources. Access control rules are primarily responsible for expressing restrictions on what can be proxied and who can use this service. By default, all access to this service is denied. Additionally, UPROXY_APPROVED[2] directives must be configured to allow proxying to specific origin servers. Although in its current form the program has the effect of anonymizing the proxied request, this is more of a bug than a feature. Future versions may forward an initial request's headers and other information. With the exception of the Cookie header, most request headers that accompany the initial request are sent with the proxied request. dacs_uproxy makes no attempt to "impersonate" the user's host, however. Therefore, to the origin server it appears as if the request is coming from dacs_uproxy and the IP address from which the forwarded request is sent. Any cookies sent with the initial request are interpreted by dacs_uproxy (e.g., to identify the user making the request for access control purposes). At present, it is not possible to forward cookies with the proxied request. So that the proxied web service can tell that it is being invoked by dacs_uproxy, an extension header named DACS-Uproxy-Via is included with the forwarded request. Its value is the URL of dacs_uproxy with the proxied host appended. With Apache, its value can be accessed from the environment variable HTTP_DACS_UPROXY_VIA. If dacs_uproxy is passed a DACS_APPROVAL[3] value, that value is forwarded with the request through the DACS-Uproxy-Approval header and made available by Apache in the HTTP_DACS_UPROXY_APPROVAL environment variable. A program invoked indirectly through dacs_uproxy can use this information to confirm that DACS authorized the request. If the forwarded request generates a redirect (a 3xx class HTTP status code is returned), it causes dacs_uproxy to return the redirection request. The program is a minimal or "micro" HTTP proxy, hence the u in dacs_uproxy should really be the Greek letter mu. Web Service Arguments With some exceptions, all arguments passed to dacs_uproxy are forwarded to the proxied request and are not interpreted by dacs_uproxy. The first exception is DACS_ACS[4]. Another exception is DACS_UPROXY; if its value is DEBUG, debugging output is produced. Neither of these arguments is forwarded with the proxied request. Operation A specification of the proxied request appears as a component of the initial request. It is best to explain this with an example. Let us assume that the URL for the dacs_uproxy that the client wants to use is https://example.com/cgi-bin/dacs/dacs_uproxy. Let us also assume that the client wants to access a web service at foo.example.com (the proxied host) and that this web service can be invoked from example.com (the proxying host) as https://foo.example.com/cgi-bin/some_app. To achieve this, the client would invoke this URL: https://example.com/cgi-bin/dacs/dacs_uproxy/foo.example.com/cgi-bin/some_app Note that no scheme is included with the name of the proxied host. A port number may follow it, however, and any path components that follow are appended (after the mapping specified by UPROXY_APPROVED) to form the final proxied URL. For this example to be authorized, an access control rule must grant the user access to the initial URL. Whether there is additional access control enforced at the proxied host is the responsibility of a web administrator. A simple rule that grants access to any authenticated user looks like this: <acl_rule status="enabled"> <services> <service url_expr='"${Conf::dacs_cgi_bin_prefix}/dacs_uproxy"'/> <service url_expr='"${Conf::dacs_cgi_bin_prefix}/dacs_uproxy/*"'/> </services> <rule order="allow,deny"> <allow> user("auth") </allow> </rule> </acl_rule> Most sophisticated rules may of course be used to further constrain how dacs_uproxy can be used and by whom. The UPROXY_APPROVED[2] directive must be configured before dacs_uproxy will do anything, even if otherwise permitted by an access control rule. If SSL is used for the proxied request, the usual DACS configuration directives for SSL apply - see dacs.conf(5)[5]. SSL can be used for the proxied request independently of whether it is used for the initial request. DIAGNOSTICS
The program exits 0 if everything was fine, 1 if an error occurred. BUGS
The implementation may not yet fully conform to RFC 2616[6]. SEE ALSO
RFC 2616[6] AUTHOR
Distributed Systems Software (www.dss.ca[7]) COPYING
Copyright2003-2012 Distributed Systems Software. See the LICENSE[8] file that accompanies the distribution for licensing information. NOTES
1. dacsoptions http://dacs.dss.ca/man/dacs.1.html#dacsoptions 2. UPROXY_APPROVED http://dacs.dss.ca/man/dacs.conf.5.html#UPROXY_APPROVED 3. DACS_APPROVAL http://dacs.dss.ca/man/dacs_acs.8.html#dacs_approval 4. DACS_ACS http://dacs.dss.ca/man/dacs_acs.8.html#dacs_acs_argument 5. dacs.conf(5) http://dacs.dss.ca/man/dacs.conf.5.html 6. RFC 2616 http://www.rfc-editor.org/rfc/rfc2616.txt 7. www.dss.ca http://www.dss.ca 8. LICENSE http://dacs.dss.ca/man/../misc/LICENSE DACS 1.4.27b 10/22/2012 DACS_UPROXY(8)
All times are GMT -4. The time now is 02:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy