Skip to content
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

SSL Certificate update doesn't reload nginx #2566 #2605

Conversation

phillxnet
Copy link
Member

Use systemctl wrapper to reload nginx post SSL cert reconfig. From Rockstor v4.5.4-0 onwards nginx is no longer managed by supervisord.

Includes

  • Nginx reload not restart to avoid Web-UI service interruption and enable confirmation dialog display.

Fixes #2566

Testing

https://doc.opensuse.org/documentation/leap/reference/html/book-reference/cha-apache2.html

zypper in --no-recommends apache2-utils apache2
gensslcert -h
buildvm:~ # gensslcert -o "The Rockstor Project" -c PT -email support@rockstor.com
comment         mod_ssl server certificate
C               PT
ST              unknown
L               unknown
U               web server
O               The Rockstor Project
CN              buildvm.lan
email           mail
altName         DNS:buildvm.lan
srvdays         730
CAdays          2190

Then used the contents of the following generated files, by way of a test certificate set, to complete the form presented within the Web-UI under SYSTEM -> SSL Certificate:

SSLCertificateFile (Certificate)

/etc/apache2/ssl.crt/buildvm.lan-server.crt

SSLCertificateKeyFile (Private Key)

/etc/apache2/ssl.key/buildvm.lan-server.key

Resulting confirmation dialog:

Cert-update-success-dialog

After accepting the dialog we are re-presented with adding an exception option given our 'fake' self-signed testing certificate as per the following installation step:
https://rockstor.com/docs/installation/installer-howto.html#visit-rockstor-s-web-ui

And by selecting "Advance" in the above we have a "View Certificate" link which confirms our new Certificate info:

view-cert

Use systemctl wrapper to reload nginx post SSL cert
reconfig. From Rockstor v4.5.4-0 onwards nginx is no
longer managed by supervisord.
# Includes
- Nginx reload not restart to avoid Web-UI service
interruption and enable confirmation dialog display.
@phillxnet phillxnet merged commit 9fdeff3 into rockstor:master Jul 10, 2023
@phillxnet phillxnet deleted the 2566_SSL_Certificate_update_doesn't_restart_nginx branch July 10, 2023 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SSL Certificate update doesn't reload nginx
1 participant