fix: [doc:rhel-installer] Correct conditional addition of httpd Listen 443 line

pull/9636/head
Jeroen Pinoy 2024-03-23 17:26:37 +01:00
parent 0a77e3c3b8
commit b61a39ff94
No known key found for this signature in database
GPG Key ID: DF33A50B8E4EE081
2 changed files with 6 additions and 2 deletions

View File

@ -411,7 +411,9 @@ apacheConfig_RHEL7 () {
#sudo sed -i "s/SetHandler/\#SetHandler/g" /etc/httpd/conf.d/misp.ssl.conf
sudo rm /etc/httpd/conf.d/ssl.conf
sudo chmod 644 /etc/httpd/conf.d/misp.ssl.conf
sudo sed -i '/Listen 443/!s/Listen 80/a Listen 443/' /etc/httpd/conf/httpd.conf
if ! grep -x "Listen 443" /etc/httpd/conf/httpd.conf; then
sudo sed -i '/Listen 80/a Listen 443' /etc/httpd/conf/httpd.conf
fi
# If a valid SSL certificate is not already created for the server, create a self-signed certificate:
echo "The Common Name used below will be: ${OPENSSL_CN}"

View File

@ -452,7 +452,9 @@ apacheConfig_RHEL8 () {
#sudo sed -i "s/SetHandler/\#SetHandler/g" /etc/httpd/conf.d/misp.ssl.conf
sudo rm /etc/httpd/conf.d/ssl.conf
sudo chmod 644 /etc/httpd/conf.d/misp.ssl.conf
sudo sed -i '/Listen 443/!s/Listen 80/a Listen 443/' /etc/httpd/conf/httpd.conf
if ! grep -x "Listen 443" /etc/httpd/conf/httpd.conf; then
sudo sed -i '/Listen 80/a Listen 443' /etc/httpd/conf/httpd.conf
fi
# If a valid SSL certificate is not already created for the server, create a self-signed certificate:
echo "The Common Name used below will be: ${OPENSSL_CN}"