|
Home > Archive > Apache Server configuration support > July 2004 > Apache rewriterule and Web Service
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Apache rewriterule and Web Service
|
|
| tao lin 2004-07-26, 6:04 pm |
| Hi, all
I am using Apache 1.3.26 under Debain Woody. I am using Apache as a firewall
redirect all the http request to my win2000 IIS server. In my httpd.conf, I
have follow setting:
<VirtualHost *>
ServerName guides.com
ServerAlias guides.com *.guides.com
RewriteEngine on
RewriteLogLevel 9
....
RewriteRule ^/WebServuce/API/(.*) http://100.90.80.3/WebService/API/$1
[P,L]
</VirtualHost>
I write a webservice under MS.Net and sit in the
http://100.90.80.3/WebService/API/mywebservice.asxm
When I use IE to browse the webservice
http://guides.com/WebService/API/mywebservice.asxm, it works fine and I can
get the web service derscription. But once I try to add the webserivice into
my project web reference. My VS.net said
Unable to download follow files from
http://100.90.80.3/WebService/API/m...rvice.asxm?wsdl
It looks like it try to use my actual win2000 box machine ip address which
of course can not be seen from my client (Dev) machine.
So does any one know how to setup this in Apache so that my client machine
don't use http://100.90.80.3 instead of http://guides.com as the web
service reference?
Cheers,
Tao
| |
| Justin Koivisto 2004-07-26, 6:04 pm |
| tao lin wrote:
> Hi, all
>
> I am using Apache 1.3.26 under Debain Woody. I am using Apache as a firewall
> redirect all the http request to my win2000 IIS server. In my httpd.conf, I
> have follow setting:
>
> <VirtualHost *>
> ServerName guides.com
> ServerAlias guides.com *.guides.com
> RewriteEngine on
> RewriteLogLevel 9
> ....
> RewriteRule ^/WebServuce/API/(.*) http://100.90.80.3/WebService/API/$1
> [P,L]
> </VirtualHost>
>
> I write a webservice under MS.Net and sit in the
> http://100.90.80.3/WebService/API/mywebservice.asxm
> When I use IE to browse the webservice
> http://guides.com/WebService/API/mywebservice.asxm, it works fine and I can
> get the web service derscription. But once I try to add the webserivice into
> my project web reference. My VS.net said
> Unable to download follow files from
> http://100.90.80.3/WebService/API/m...rvice.asxm?wsdl
> It looks like it try to use my actual win2000 box machine ip address which
> of course can not be seen from my client (Dev) machine.
>
> So does any one know how to setup this in Apache so that my client machine
> don't use http://100.90.80.3 instead of http://guides.com as the web
> service reference?
IIRC, you'll need to use port-forwarding and ip masquerading to do this...
--
Justin Koivisto - spam@koivi.com
PHP POSTERS: Please use comp.lang.php for php related questions,
alt.php* groups are not recommended.
| |
| tao lin 2004-07-26, 6:04 pm |
| Good idea, I think use iptable should works fine for me.
Thanks for you help.
Tao
"Justin Koivisto" <spam@koivi.com> wrote in message
news:M6fNc.639$jz4.23243@news7.onvoy.net...
machine[vbcol=seagreen]
>
> IIRC, you'll need to use port-forwarding and ip masquerading to do this...
>
> --
> Justin Koivisto - spam@koivi.com
> php POSTERS: Please use comp.lang.php for php related questions,
> alt.php* groups are not recommended.
| |
| tao lin 2004-07-28, 6:25 pm |
| Hi, Justin
I just have a look the Apache document, and find the
ProxyPass & ProxyPassReverse directive
So I try
ProxyPass /WebServuce/API/ http://100.90.80.3/WebService/API
ProxyPassReverse /WebServuce/API/ http://100.90.80.3/WebService/API
Then I restart my apache server. But the result is still same. My soap
reference xml still is
<port name="mywebserviceSoap" binding="s0:mywebserviceSoap">
<soap:address
location="http://100.90.80.3/WebService/API/mywebservice.asxm" />
</port>
But in the http://httpd.apache.org/docs/mod/mo...html#proxypass, it
should pass me back as "http://guides.com/WebService/API/mywebservice.asxm"
What's wrong with my Apache setting?
Cheers,
Tao
"Justin Koivisto" <spam@koivi.com> wrote in message
news:M6fNc.639$jz4.23243@news7.onvoy.net...
> tao lin wrote:
>
firewall[vbcol=seagreen]
httpd.conf, I[vbcol=seagreen]
can[vbcol=seagreen]
into[vbcol=seagreen]
which[vbcol=seagreen]
machine[vbcol=seagreen]
>
> IIRC, you'll need to use port-forwarding and ip masquerading to do this...
>
> --
> Justin Koivisto - spam@koivi.com
> php POSTERS: Please use comp.lang.php for php related questions,
> alt.php* groups are not recommended.
|
|
|
|
|