httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <siba.d...@wipro.com>
Subject [users@httpd] How to retrieve the real URL in case of Proxy
Date Fri, 24 Sep 2004 11:19:09 GMT

Hi ,

I am having a proxy server which does authentication and if successful
proxies the request. The control is working fine.

Mentioned below is the httpd.conf setting


<IfModule mod_proxy.c>
	ProxyRequests Off

	<Directory "proxy:http://abc.com/noauth">
		AuthName AUTH-BASIC
		AuthType Basic
		require valid-user
		Options Indexes FollowSymLinks MultiViews ExecCGI
		AllowOverride None
		Order allow,deny
		Allow from all
	</Directory>

ProxyPass /basic http://abc.com/noauth/
ProxyPassReverse /basic http://abc.com/noauth/

</IfModule>


Now assuming I am accessing www.parent.com/basic/index.html i would be
redirected to abc.com/noauth/index.html.

My Question is how do I retrieve the proxied URL i.e.
abc.com/noauth/index.html in my module.

Apache it seems is doing a internal redirect to get the contents.

I even tried getting the handle of the proxy module and then obtain the
ent[i].real (as mentioned in proxy_trans function)

But I wasn't able to retireve the handle of the module.

------------------------------------------------------------------
------------------------------------------------------------------

FILE *infile = NULL;
	static module *pModule = NULL;

	void *sconf = r->server->module_config;

	proxy_server_conf *conf;
    int i, len;
    struct proxy_alias *ent = (struct proxy_alias *)conf->aliases->elts;
	if(pModule == NULL)
		pModule = ap_find_linked_module("mod_proxy.c");
	if(!pModule)
	{
		fprintf(infile,"Module proxy Not Loaded !!!.\n");
		return DECLINED;
	}

	conf = (proxy_server_conf *)ap_get_module_config(sconf,
&pModule);

-----------------------------------------------------------------
-----------------------------------------------------------------

but the compilation gives me the error in (conf = (proxy_server_conf
*)ap_get_module_config(sconf, &pModule);)

left of ->module_index' must point to struct/union


Can anyone help me

Thanks in advance
shiva








Confidentiality Notice

The information contained in this electronic message and any attachments to this message are
intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information.
If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com
immediately
and destroy all copies of this message and any attachments.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message