You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by "Alex Heneveld (JIRA)" <ji...@apache.org> on 2014/11/27 12:50:12 UTC
[jira] [Commented] (BROOKLYN-95) support switching nginx from SSL
to non-SSL
[ https://issues.apache.org/jira/browse/BROOKLYN-95?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14227563#comment-14227563 ]
Alex Heneveld commented on BROOKLYN-95:
---------------------------------------
currently it is possible via groovy, using:
{noformat}
boolean useHttps = true;
import brooklyn.entity.proxy.ProxySslConfig;
import brooklyn.entity.basic.Entities;
nginx = mgmt.lookup("IPJler3x");
if (useHttps) {
// enable SSL
ProxySslConfig ssl = new ProxySslConfig();
ssl.setCertificateSourceUrl("file:/tmp/sample/server.crt");
ssl.setKeySourceUrl("file:/tmp/sample/server.key");
nginx.setConfig(nginx.SSL_CONFIG, ssl);
nginx.setConfig(nginx.PROXY_HTTP_PORT, "8443+");
nginx.setAttribute(nginx.PROXY_HTTP_PORT, 8443);
} else {
// disable ssl
nginx.setConfig(nginx.SSL_CONFIG, null);
nginx.setConfig(nginx.PROXY_HTTP_PORT, "8000+");
nginx.setAttribute(nginx.PROXY_HTTP_PORT, 8000);
}
// and then clear things and restart
Entities.deproxy(nginx).disconnectSensors();
nginx.removeAttribute(nginx.MAIN_URI);
Entities.deproxy(nginx).reconfigureService();
nginx.restart();
{noformat}
> support switching nginx from SSL to non-SSL
> -------------------------------------------
>
> Key: BROOKLYN-95
> URL: https://issues.apache.org/jira/browse/BROOKLYN-95
> Project: Brooklyn
> Issue Type: New Feature
> Reporter: Alex Heneveld
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)