<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span>Hi Roger,</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span><br></span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span>Thanks for your configuration, I swapped this with my existing re-write rule and it works a charm.</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span><br></span></div><div><span style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">Interestingly though, it will not pick up https://test.domain.com:443/geoserver/options.png, whereas </span><a href="http://secure.bolsterstonewindpower.com:8080/geoserver/options.png"
 style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">http://test.domain.com:8080/geoserver/options.png</a><font size="3"> works fine. As images are not an issue here, I have left the image sources </font>referencing<font size="3"> the geoserver directly.</font></div><div><font size="3"><br></font></div><div><font size="3">Now this is sorted, I am still having difficulties with WFS. If I open the following in a web browser, I get the 'GetCapabilities' XML:</font></div><div><font size="3"><a href="https://secure.bolsterstonewindpower.com:444/geoserver/wfs?service=wfs&version=1.1.0&request=GetCapabilities">https://test.domain.com:443/geoserver/wfs?service=wfs&version=1.1.0&request=GetCapabilities</a> <br></font></div><div><font size="3"><br></font></div><div><font size="3">However, I have been unable to load a WFS layer via OpenLayers. The current script is:</font></div><div><font
 size="3"><br></font></div><div><font size="3"><div><span class="Apple-tab-span" style="white-space:pre">          </span>var GEOSERVER_HOST = 'https://username:password@test.domain.com';</div><div>                var GEOSERVER_PORT = '443';</div><div>                </div><div>                testLayer = new OpenLayers.Layer.Vector("Test Layer", {</div><div>                strategies : [new OpenLayers.Strategy.Fixed()],</div><div>                protocol : new OpenLayers.Protocol.WFS({</div><div>                version : "1.1.0",</div><div>                url : GEOSERVER_HOST + ":" + GEOSERVER_PORT + "/geoserver/TestWorkspaceURI/wfs", </div><div>       
         featurePrefix : "TestWorkspace",</div><div>                featureType : "TestLayer",</div><div>                srsName : "EPSG:27700"</div><div>                })</div><div>                })</div><div>                map.addLayer(testLayer);</div><div><br></div><div>I have tried various variations of URIs and layer names, but none appear on the map. Nothing is displayed in the Google Chrome console, either.</div><div><br></div><div>If I log into the geoserver and click on 'OpenLayers' under 'Layer Preview' on TestLayer, the sample map displays fine, but interestingly it requests a WMS service to display a vector
 feature?!</div><div>http://test.domain.com:8080/geoserver/TestWorkspace/wms?service=WMS&version=1.1.0&request=GetMap&layers=TestWorkspace:TestLayer&styles=&bbox=240049.984375,234576.0,655472.0,883647.0&width=327&height=512&srs=EPSG:27700&format=application/openlayers<br></div><div><br></div></font></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">Are you able to give me a pointer as to where I am going wrong here? The WMS background layers via the same server work fine.</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">Many thanks,</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;
 ">Rob</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div>  <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Roger Bedell <sylvanascent@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> uk52rob <uk52rob@yahoo.co.uk> <br><b><span style="font-weight: bold;">Cc:</span></b> "Geoserver-users@lists.sourceforge.net" <Geoserver-users@lists.sourceforge.net> <br> <b><span style="font-weight: bold;">Sent:</span></b> Monday, 16 July 2012, 2:15<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Geoserver-users] Using Geoserver WFS across domains<br> </font> </div> <br><div id="yiv1625113306">Hi Rob,<div>We have almost the same
 configuration (not 443 though), and IIS7 URL Rewrite works very well, much simpler than the Tomcat redirector. However, it wasn't clear in the IIS documentation that you need to install more than just URL Rewrite, particularly you need the ARR: <a rel="nofollow" target="_blank" href="http://www.iis.net/download/ApplicationRequestRouting">http://www.iis.net/download/ApplicationRequestRouting</a></div>

<div><br></div><div>Once I installed that, (and enabled the ARR Proxy) I used the following rule:</div><div><br></div><div><div><?xml version="1.0" encoding="UTF-8"?></div><div><configuration></div>

<div>    <system.webServer></div><div>        <rewrite></div><div>            <rules></div><div>                <rule name="GeoServer" patternSyntax="Wildcard"></div><div>                    <match url="geoserver*" /></div>

<div>                    <action type="Rewrite" url="<a rel="nofollow" target="_blank"  href="http://204.62.18.181:8080/%7BR:0%7D">http://204.62.18.181:8080/{R:0}</a>" /></div><div>                </rule></div><div>            </rules></div>

<div>        </rewrite></div><div>    </system.webServer></div><div></configuration></div><div><br></div><div>So far, so good.</div><div><br></div><div>Roger</div><br><div class="yiv1625113306gmail_quote">On Fri, Jul 13, 2012 at 4:59 AM, uk52rob <span dir="ltr"><<a rel="nofollow" ymailto="mailto:uk52rob@yahoo.co.uk" target="_blank" href="mailto:uk52rob@yahoo.co.uk">uk52rob@yahoo.co.uk</a>></span> wrote:<br>

<blockquote class="yiv1625113306gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><div><div>Hi All,</div><div><br></div>

<div>I know this is not the first time this has been mentioned. I have searched for days for a solution without success, so I am hoping someone else has solved this in a similar environment.</div><div><br></div><div>System: </div>

<div>Windows 2008 Web Server</div><div>IIS 7</div><div>Geoserver 2.1.4</div><div><br></div><div>The main website runs via IIS on ssl port 443 (<a rel="nofollow" target="_blank" href="https://geoserver.testdomain.com/">https://geoserver.testdomain.com:443</a>), whereas Geoserver's Jetty webserver runs on port 8080, non-ssl (<a rel="nofollow" target="_blank"  href="http://geoserver.testdomain.com:8080/">http://geoserver.testdomain.com:8080</a>).</div>

<div><br></div><div>The issue arises when the openlayers javascript runs on the main website. All WMS layers are fine, but javascript will not allow the WFS (XML) layers from the other port. This returns <span style="color: rgb(255, 0, 0); font-family: Consolas, monospace; font-size: 12px; white-space: pre-wrap; ">Origin <a rel="nofollow" target="_blank" href="https://geoserver.testdomain.com/">https://geoserver.testdomain.com:443</a></span><span style="color: rgb(255, 0, 0); font-family: Consolas, monospace; font-size: 12px; white-space: pre-wrap; "> is not allowed by Access-Control-Allow-Origin.</span></div>

<div><span style="color: rgb(255, 0, 0); font-family: Consolas, monospace; font-size: 12px; white-space: pre-wrap; "><br></span></div><div>I have tried a number of work-arounds, including:</div><div><br></div><div><span style="font-weight:bold;">Using IIS URL Rewrite</span></div>

<div><a rel="nofollow" target="_blank" href="http://cartoninjas.pl/post/2010/10/12/Installing-GeoServer-on-Windows-7-(x32-or-x64)-and-IIS-75.aspx" style="color:rgb(35,71,134);outline:0px;">http://cartoninjas.pl/post/2010/10/12/Installing-GeoServer-on-Windows-7-(x32-or-x64)-and-IIS-75.aspx</a> (returns "forbidden" or "site not found" errors)<br>

</div><div><br></div><div><span style="font-weight:bold;">Modify Jetty access control</span></div><div><a rel="nofollow" target="_blank" href="http://jetty.4.n6.nabble.com/Jetty-Access-Control-Allow-Origin-td4634198.html" style="color:rgb(35,71,134);outline:0px;">http://jetty.4.n6.nabble.com/Jetty-Access-Control-Allow-Origin-td4634198.html</a> (causes the jetty server to fail in starting up)<br>

</div><div><br></div><div><span style="font-weight:bold;">Using an IIS proxy</span></div><div><a rel="nofollow" target="_blank" href="http://code.google.com/p/iisproxy/issues/detail?id=8" style="color:rgb(35,71,134);outline:0px;">http://code.google.com/p/iisproxy/issues/detail?id=8</a> (returns a 500 - Internal server error)<br>

</div><div><br></div><div><span style="font-weight:bold;">General Info</span></div><div><a rel="nofollow" target="_blank" href="http://stackoverflow.com/questions/9327218/access-control-allow-origin-not-allowed-by" style="color:rgb(35,71,134);outline:0px;">http://stackoverflow.com/questions/9327218/access-control-allow-origin-not-allowed-by</a> <br>

</div><div><br></div><div>This is not the entire list, as some methods have been removed from my browser history, but it will give you an idea of the steps taken.</div><div><br></div><div><span>I have not run the HTML / javascript directly from the WWW directory in Geoserver, as the WFS / WMS connection strings include a username and password, which would then be freely available to look at in the HTML document. Instead, they are encapsulated within the current PHP scripts running on the main IIS domain, which offers them some protection.</span></div>

<div><br></div><div>If anyone has any experience with this issue, I would be grateful to hear from you.</div><div><br></div><div>Many thanks,</div><div><br></div><div>Rob</div></div></div></div><br>------------------------------------------------------------------------------<br>


Live Security Virtual Conference<br>
Exclusive live event will cover all the ways today's security and<br>
threat landscape has changed and how IT managers can respond. Discussions<br>
will include endpoint security, mobile security and the latest in malware<br>
threats. <a rel="nofollow" target="_blank" href="http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/">http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/</a><br>_______________________________________________<br>
Geoserver-users mailing list<br>
<a rel="nofollow" ymailto="mailto:Geoserver-users@lists.sourceforge.net" target="_blank" href="mailto:Geoserver-users@lists.sourceforge.net">Geoserver-users@lists.sourceforge.net</a><br>
<a rel="nofollow" target="_blank" href="https://lists.sourceforge.net/lists/listinfo/geoserver-users">https://lists.sourceforge.net/lists/listinfo/geoserver-users</a><br>
<br></blockquote></div><br></div>
</div><br><br> </div> </div>  </div></body></html>