I'm currently trying to implement an Owncloud system at our company. I have the Owncloud system up and running on an internal webserver which is behind a firewall. I can access the installation internally by navigating to servername.company.co.nz/owncloud
We have an IIS webserver that is public facing (SBS 2012). I'd like to use this as a reverse proxy to the cloud installation. I have read a few articles and tutorials on how to achieve this using URL Rewriting and ARR on IIS - this one in particular seemed like a good start : IIS 7 Reverse Proxy based on domain name host?
But so far I have not been able to create any reverse proxy rules that work.
Basically, I would like a subdomain cloud.company.co.nz
to reverse proxy to the internal webserver path server.company.co.nz/owncloud
have not been able to figure out how to achieve this.
I currently have a new website on out IIS server which is bound to the cloud.company.co.nz
hostname, but that's about all I've been able to accomplish without knocking over our Exchange Web Services.
Please bear in mind I am an IIS newbie. Any help is greatfuly received at this stage.
Edit 1:
As per @jotap's suggestion, my web.config now looks like this. However, all I get is a 503 error. Any ideas as to why I would get this? Also, where should I be looking in terms of logs etc for clues?
Cheers
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="ReverseProxyInboundRule1" enabled="false" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="http://1.2.3.4/owncloud{R:1}" />
</rule>
</rules>
<outboundRules>
<rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1" enabled="false">
<match filterByTags="A, Form, Img" pattern="^http(s)?://1.2.3.4/owncloud/(.*)" />
<action type="Rewrite" value="http{R:1}://cloud.company.co.nz/{R:2}" />
</rule>
<preConditions>
<preCondition name="ResponseIsHtml1">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
</system.webServer>
</configuration>