apache - https下的GeoServer

标签 apache tomcat ssl https geoserver

我在 localhost:80 上使用 apache web 服务器,并从 localhost:8080 上的 tomcat 提供 Geoserver

我最近在 apache 上安装了 SSL 证书,它工作正常,除了我收到消息说我有不安全的内容,我认为它们是 GeoServer 层。所以现在我正在尝试为 GeoServer 启用 SSL 并拥有像 htis https://example.org:8080/geoserver 这样的 Openlayers 内容但仍然不确定这样做的最佳方法是什么。

最佳答案

我的建议:
在 Apache 中添加(反向)代理并配置仅连接到代理 GeoServer 的 Apache 的 Web 应用程序。

ProxyPass "/geoserver"  "http://localhost:8080/geoserver"
ProxyPassReverse "/geoserver"  "http://localhost:8080/geoserver"

这样,您只需要在防火墙中允许 HTTPS,除非您在防火墙上启用端口 8080,否则外部没有人有机会访问 GeoServers Web 界面。另见 https://gis.stackexchange.com/q/4323/109339了解更多详情。

请注意,您应该设置 https://docs.geoserver.org/stable/en/user/configuration/globalsettings.html#proxy-base-url通过您的 Apache 使用具有公共(public)可访问 URL 的 GeoServer,例如https://your-apache.com/geoserver - 否则从 GeoServer 生成的绝对 URL,例如GetCapabilities 以 http://localhost:8080/geoserver 开头(不再可达)。

如果你还没有使用 Apache,我会推荐 nginx。

关于apache - https下的GeoServer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23708317/

相关文章:

linux - 保留文件中最后 x 条日志 - Linux

java - 如果 tomcat 作为 Windows 服务托管,tomcat8.exe 会消耗大量 CPU/内存

sql-server - Unicode 和性能

tomcat - 通过 Infoview 的 Business Objects XI 3.0 仪表板错误

php - 文件获取内容(https ://url) fails

linux - URL 重写这个 .htaccess 的更好方法

java - 从哪里获得 apache JavaHL 颠覆绑定(bind)库?

php - 是否可以在没有 Apache HTTP 服务器的情况下在 Apache Tomcat 6.0.32 上安装 PHP 5 和 MySQL?

powershell - 获取证书的预期目的

postgresql - Azure PostgreSQL 服务器上的 TLSv1.2