Disable Apache port 80

Currently, Apache ports.conf file is not being configured by this
charm. This patch changes the ports.conf default file with another one
that does not open port 80 on SSL environments.

Change-Id: I63f46223c64f2561f505828491a482dea79dc39a
Closes-bug: #1845665
This commit is contained in:
tpsilva 2019-11-02 07:30:20 -03:00 committed by Tiago Pasqualini da Silva
parent 8a1a666d4d
commit 2d8d80e47e
2 changed files with 9 additions and 0 deletions

View File

@ -94,6 +94,7 @@ MEMCACHED_CONF = '/etc/memcached.conf'
SWIFT_RINGS_CONF = '/etc/apache2/conf.d/swift-rings'
SWIFT_RINGS_24_CONF = '/etc/apache2/conf-available/swift-rings.conf'
HAPROXY_CONF = '/etc/haproxy/haproxy.cfg'
APACHE_PORTS_CONF = '/etc/apache2/ports.conf'
APACHE_SITES_AVAILABLE = '/etc/apache2/sites-available'
APACHE_SITE_CONF = os.path.join(APACHE_SITES_AVAILABLE,
'openstack_https_frontend')
@ -200,6 +201,10 @@ CONFIG_FILES = OrderedDict([
'hook_contexts': [MemcachedContext()],
'services': ['memcached'],
}),
(APACHE_PORTS_CONF, {
'contexts': [],
'services': ['apache2'],
}),
])
RING_CONSUMER_ROLE = 'swift-proxy-rings-consumer'

4
templates/ports.conf Normal file
View File

@ -0,0 +1,4 @@
# File written by Juju: don't open default ports on SSL environments (see LP 1845665).
<IfModule !ssl_module>
Listen 80
</IfModule>