-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sample SSL configuration file for apache #264
Conversation
I have verified and this works fine. @TimothyAsir , Make appropriate changes in spec files and send a PR |
@anivargi , Please go ahead and merge this |
Is it ok to use ip address where etcd is configured to listen? So far we were using the same public ip address for everything as a default, so I'm thinking about reusing it here as well (with an option to redefine via variable if needed), but would like to verify this idea. I need to experiment a bit with ansible variables such as
Also I see that in
During 2017-09-12 dev meeting, Nishanth pointed out that this localhost cert is created during installation of |
tendrl-bug-id: Tendrl#264 Signed-off-by: Timothy Asir J <tjeyasin@redhat.com>
tendrl-bug-id: Tendrl#264 Signed-off-by: Timothy Asir J <tjeyasin@redhat.com>
tendrl-bug-id: Tendrl#264 Signed-off-by: Timothy Asir J <tjeyasin@redhat.com>
tendrl-bug-id: Tendrl#264 Signed-off-by: Timothy Asir J <tjeyasin@redhat.com>
tendrl-bug-id: Tendrl#264 Signed-off-by: Timothy Asir J <tjeyasin@redhat.com>
Scope
This configuration enables two scenarios:
Pre-requisites:
mod_ssl
package installed and the default configurations left unmodified.%ssl_virtualhost_ip%
with the correct IP of the host.ServerName
directive to reflect the FQDN that apache would serve requests over.Limitations
This configuration file avoids modification to any of the configuration files installed by system packages. As such, this configuration file can only serve the scenarios where the requests are served over a specific IP. If this is undesirable, the
VirtualHost
for_default_:443
needs to be commented out in/etc/httpd/conf.d/ssl.conf
(which is installed by themod_ssl
package) and the%ssl_virtualhost_ip%
in both these files needs to be changed to_default_
.However, I have NOT tested this configuration.
Please refer to the apache wiki for more details.
Deployment Notes
@TimothyAsir The RPM package for tendrl-api must NOT install the
apache.vhost-ssl.sample
file with a.conf
extension under/etc/httpd/conf.d
. Copying it over as/etc/httpd/conf.d/tendrl-ssl.conf.sample
should be fine. The file will not work without manual modifications. It is safe to deploy theapache.vhost.sample
file as it is currently done, since it does not consider the SSL deployment as the default.@mbukatov tendrl-ansible would need to implement the configuration steps listed in the Deployment Instructions section below.
Deployment Instructions
https support over a specific IP with no redirect
Deploy
apache.vhost-ssl.sample
as/etc/httpd/conf.d/tendrl-ssl.conf
. If the RPM installs it correctly, copy (NOT move) the/etc/httpd/conf.d/tendrl-ssl.conf.sample
file without the.sample
extension. Make the following changes to this file:%ssl_virtualhost_ip%
with the correct IP.ServerName
.Thereafter, check if the configuration is valid using
apachectl -t
and reload httpd usingsystemctl reload httpd.service
.Automatic redirect of all http urls to https
After following the steps to enable https, as listed above, update the
apache.vhost.sample
file (which would already have been deployed by the tendrl-api RPM as/etc/httpd/conf.d/tendrl.conf
) as follows:%ssl_virtualhost_ip%
with the IP used in the SSL configuration file.Redirect
rule.DocumentRoot
,ProxyPass
andProxyPassReverse
directives.Thereafter, check if the configuration is valid using
apachectl -t
and reload httpd usingsystemctl reload httpd.service
.Further Actions Required
@nthomas-redhat once this configuration has been tested, the deployment instructions below (or maybe, most of this document, apart from this section) need to be documented officially.
@TimothyAsir the RPM spec file needs to be updated to copy over the
apache.vhost-ssl.sample
file to/etc/httpd/conf.d/tendrl-ssl.conf.sample
.@mbukatov the deployment instructions need to be automated. This may require the administrator to provide some configuration details such as the IP address and FQDN of the host (although, it is possible to automate this to a degree) and possibly the proper SSL certificate and key to be copied over.