mirror of https://github.com/MISP/MISP
Merge pull request #9636 from Wachizungu/fix-rhel-httpd-listen-config
fix: [doc:rhel-installer] Correct conditional addition of httpd Liste…pull/9637/head
commit
3e4738adeb
|
@ -411,7 +411,9 @@ apacheConfig_RHEL7 () {
|
||||||
#sudo sed -i "s/SetHandler/\#SetHandler/g" /etc/httpd/conf.d/misp.ssl.conf
|
#sudo sed -i "s/SetHandler/\#SetHandler/g" /etc/httpd/conf.d/misp.ssl.conf
|
||||||
sudo rm /etc/httpd/conf.d/ssl.conf
|
sudo rm /etc/httpd/conf.d/ssl.conf
|
||||||
sudo chmod 644 /etc/httpd/conf.d/misp.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:
|
# 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}"
|
echo "The Common Name used below will be: ${OPENSSL_CN}"
|
||||||
|
|
|
@ -452,7 +452,9 @@ apacheConfig_RHEL8 () {
|
||||||
#sudo sed -i "s/SetHandler/\#SetHandler/g" /etc/httpd/conf.d/misp.ssl.conf
|
#sudo sed -i "s/SetHandler/\#SetHandler/g" /etc/httpd/conf.d/misp.ssl.conf
|
||||||
sudo rm /etc/httpd/conf.d/ssl.conf
|
sudo rm /etc/httpd/conf.d/ssl.conf
|
||||||
sudo chmod 644 /etc/httpd/conf.d/misp.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:
|
# 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}"
|
echo "The Common Name used below will be: ${OPENSSL_CN}"
|
||||||
|
|
Loading…
Reference in New Issue