0

My target is to set up a WMS that can be displayed with OpenLayers.

Therefore I have set up GeoServer (2.10.1) on a Windows machine (Windows Server 2008 R2) and am successful to the point that I can reach the GeoServer interface on localhost:myport/geoserver including layer previews. On the machine itself I can also reach GeoServer via mydomain.com:myport/geoserver.

But I cannot reach it either from any other computer or via QGIS GeoServer Explorer plugin...

When I copy the layer preview URL to a browser on another machine, it ends up with a ERR_CONNECTION_TIMED_OUT.

I have tried setting the proxy URL in "Global Settings" to http://www.mydomain.com, but that didn't make a difference.

There is already a xampp installation running with Apache, Tomcat & MySQL. As Tomcat is already using port 8080, I am using another port for GeoServer.

Any ideas what I'm doing wrong?

3
  • 1
    open the firewall for the port you are using?
    – Ian Turton
    Commented Jan 9, 2017 at 16:47
  • 1
    Can you proxy your GeoServer WMS service through your existing Apache-HTTP service?
    – nmtoken
    Commented Jan 9, 2017 at 17:30
  • @nmtoken: Thanks for the hint! I did it according to gis.stackexchange.com/questions/31750/… . And it worked, yeah! Now, I still need to enable this for SSL...
    – Franka
    Commented Jan 10, 2017 at 10:44

1 Answer 1

2

Ok, so for other newbies to this topic:

First, I set up a proxy in my Apache (conf/httpd.conf) by enabling some modules and adding a VirtualHost section, according to How to proxy Geoserver through Apache in Windows.

Then, to enable SSL, I added another VirtualHost in conf\extra\httpd-vhosts.conf, according to http://documents.software.dell.com/desktop-workspace/4.0/advanced-setup-guide/deploying-a-reverse-proxy-server-with-apache:

<VirtualHost *:443>
    ServerName mydomain.com
    ServerAlias www.mydomain.com
    DocumentRoot "path/to/my/root"
    ErrorLog "logs/error-ssl.log"
    CustomLog "logs/access-ssl.log" common
    ProxyRequests Off
    ProxyPreserveHost Off

    <Location />
    Order allow,deny
    Allow from all
    </Location>

    SSLEngine on
    SSLCertificateFile "path/to/my/file"
    SSLCertificateKeyFile "path/to/my/file"
    ProxyPass /geoserver http://localhost:myport/geoserver
    ProxyPassReverse /geoserver http://localhost:myport/geoserver
    SSLProxyEngine On
</VirtualHost>
5
  • When I added SSL in a similar environment I used conf/extra/httpd-ssl.conf rather than httpd-vhosts.conf. I am using the same domain name for http and https and it is working well.
    – Ralph Dell
    Commented Jan 10, 2017 at 14:45
  • @RalphDell: I figured I could have used httpd-ssl.conf as well, but wanted to stick to that guide. Did you use the same kind of virtualhost definition or does it work any different there?
    – Franka
    Commented Jan 11, 2017 at 14:48
  • 1
    Here is my Virtual host definition, it is very similar. I am not running my geoserver request through ssl. <VirtualHost default:443> DocumentRoot "path/to/my/root" ServerName mydomain.com:443 SSLEngine on SSLCertificateFile "path/to/cert.pem" SSLCertificateKeyFile "path/to//key.pem" # I also needed this, on some browsers I was getting an invalid certificate error, # my certificate files are from godaddy and supplied to me by our IT dept ( very helpful ) SSLCACertificateFile "path/to/gd_bundle-g2-g1.crt" </VirtualHost>
    – Ralph Dell
    Commented Jan 12, 2017 at 15:33
  • I apologize for my bad code editing
    – Ralph Dell
    Commented Jan 12, 2017 at 15:41
  • with my new ssl certificates supplied to me today, by our IT dept, I no longer needed SSLCACertificateFile "path/to/gd_bundle-g2-g1.crt"
    – Ralph Dell
    Commented Jan 13, 2017 at 15:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.