logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: reverse proxy to IIS6
Author
ollie



Joined: 27 Jul 2008
Posts: 5

PostPosted: Sun 27 Jul '08 1:37    Post subject: reverse proxy to IIS6 Reply with quote

Quote:
NameVirtualHost *:8089

<VirtualHost *:8089>
ServerName 10.0.0.6 #bind hostname, could be onsmalltalk.com for example
ProxyRequests Off
proxyPass / http://10.0.0.6:11970/
proxyPassreverse / http://10.0.0.6:11970/
</VirtualHost>



hi i googled for info on reverse proxy to IIS6 and found this forum. Can u help please

the log file is still looking at the apache htdocs/ directory

i would like to go from apache from any IP/domain on port 8089

to IIS on port 11970

any help please
Back to top
ollie



Joined: 27 Jul 2008
Posts: 5

PostPosted: Sun 27 Jul '08 23:38    Post subject: Reply with quote

hi,

i have 2 sections:

1. virtual hosts

2. httpd-vhosts.conf

whats the difference??
Back to top
cbrydon



Joined: 06 Jun 2009
Posts: 3

PostPosted: Sat 06 Jun '09 3:38    Post subject: Reply with quote

Ollie, DId you ever solve your problem? I'm experiencing a similar thing I think.

I'm just getting into Apache and have used IIS for a few small sites. My current situation is
that I have Apache and IIS running on the same server with one IP address. IIS is running on port 8080 and Apache is running on port 80. Access to both my apache sites and iis sites work so long as I type in the :8080 for the iis sites.
I now have a need for users to no longer type in the port 8080 so I have attempted to add some virtual hosts in my
apache vhosts.conf file. Below are the contents of that file...

NameVirtualHost 111.111.111.111:80
NameVirtualHost 111.111.111.111:8080

# Apache Site
<VirtualHost 111.111.111.111:80>
DocumentRoot "/ms4w/Apache/htdocs"
ServerName 111.111.111.111
</VirtualHost>

# IIS Site
<VirtualHost 111.111.111.111:8080>
ServerName 111.111.111.111:8080
DocumentRoot F:/Applications/2009/Custom/SomeTown
ProxyRequests OFF
ProxyPass / http://111.111.111.111:8080/
ProxyPassReverse / http://111.111.111.111:8080/
</VirtualHost>

Access to the apache sites work fine, however access to the IIS sites do not work unless I still type in the :8080.

If I replace the IP:port number with * in the VirtualHost tags AND make the IIS Site the first in the list then I can access
my IIS sites without typing port 8080 in the URL, however the Apache sites are not accessible.

I have also tried the following (among other configurations), but just can't seem to get thiings to work....

NameVirtualHost 111.111.111.111:80

# Apache Site
<VirtualHost 111.111.111.111:80>
DocumentRoot "/ms4w/Apache/htdocs"
ServerName 111.111.111.111
</VirtualHost>

# IIS Site
<VirtualHost 111.111.111.111:80>
ServerName 111.111.111.111:80
DocumentRoot F:/Applications/2009/Custom/SomeTown
ProxyRequests OFF
ProxyPass / http://111.111.111.111:8080/
ProxyPassReverse / http://111.111.111.111:8080/
</VirtualHost>


The above code doesn't work either; it seems as though the 2nd virtual host isn't being recognized. SomeTown is actually in F:/Applications/2009/Custom. Below is the output of an error log file.

Hope someone can help.

Thanks,
Carl


[Thu Jun 04 08:43:07 2009] [notice] Apache/2.2.10 (Win32) configured -- resuming normal operations
[Thu Jun 04 08:43:07 2009] [notice] Server built: Oct 10 2008 12:39:04
[Thu Jun 04 08:43:07 2009] [notice] Parent: Created child process 844
[Thu Jun 04 08:43:07 2009] [notice] Child 844: Child process is running
[Thu Jun 04 08:43:07 2009] [notice] Child 844: Acquired the start mutex.
[Thu Jun 04 08:43:07 2009] [notice] Child 844: Starting 64 worker threads.
[Thu Jun 04 08:43:07 2009] [notice] Child 844: Starting thread to listen on port 80.
[Thu Jun 04 08:43:23 2009] [error] [client 111.111.111.111] File does not exist: C:/ms4w/Apache/htdocs/SomeTown
[Thu Jun 04 08:43:28 2009] [error] [client 111.111.111.111] File does not exist: C:/ms4w/Apache/htdocs/SomeTown



I am sure there is something simple I'm missing and hope someone can help.

Thanks Crying or Very sad
Back to top
acid.-.burn



Joined: 15 Jan 2007
Posts: 17

PostPosted: Sat 06 Jun '09 10:03    Post subject: Reply with quote

yea have you tryed to take out this
: DocumentRoot F:/Applications/2009/Custom/SomeTown
in the iss6 block & restart your server
Back to top
cbrydon



Joined: 06 Jun 2009
Posts: 3

PostPosted: Sat 06 Jun '09 13:19    Post subject: Reply with quote

Yes, I have tried taking the Document Root out of the IIS6 block and unfortunately that didn't change anything. The error log still has the same entry.

Any other ideas?
Back to top
acid.-.burn



Joined: 15 Jan 2007
Posts: 17

PostPosted: Sat 06 Jun '09 21:12    Post subject: Reply with quote

try this
Code:
# IIS Site
<VirtualHost *>
    ServerName example.com
    ProxyRequests Off
    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>
    ProxyPass / http://example.com:8080/
    ProxyPassReverse / http://example.com:8080/
    <Location />
        Order allow,deny
        Allow from all
    </Location>
</VirtualHost>

& you know to load these
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
hope it helps
Back to top
cbrydon



Joined: 06 Jun 2009
Posts: 3

PostPosted: Sun 07 Jun '09 21:21    Post subject: Reply with quote

Hi,

Tried your latest suggestion and still get the same result in the error.log file (listed below). I do have the two modules you mentioned turned on.

[Sun Jun 07 16:18:15 2009] [error] [client 142.177.238.81] File does not exist: C:/ms4w/Apache/htdocs/sometown
[Sun Jun 07 16:18:20 2009] [error] [client 142.177.238.81] File does not exist: C:/ms4w/Apache/htdocs/sometown

Is there some soft of detailed logging that I can turn on, that might give more details?

Thanks,
Carl
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7407
Location: EU, Germany, Next to Hamburg

PostPosted: Mon 08 Jun '09 11:08    Post subject: Reply with quote

maybe you need to use mod proxy html

See http://www.apachelounge.com/viewtopic.php?p=9772
Back to top
ob1kenobi



Joined: 05 May 2010
Posts: 3

PostPosted: Sat 19 Feb '11 1:24    Post subject: Reply with quote

Try this, this works for me on my apache proxy setup, make sure the proxy mod is turned on in the httpd file...

<VirtualHost *:80>

ProxyPreserveHost On
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
ServerName yourwebsite.com
ServerAlias yourwebsite.com www.yourwebsite.com http://www.yourwebsite.com (you get the idea)
<Proxy http://localhost:8080/>
Order Allow,Deny
Allow from all
</Proxy>

</VirtualHost>
Back to top


Reply to topic   Topic: reverse proxy to IIS6 View previous topic :: View next topic
Post new topic   Forum Index -> Apache