Fedora 27
Sponsored Link

SSL Settings2017/12/26

Configure SSL to use secure encrypt connection.
[2] Configure httpd for SSL.
[root@www ~]#
dnf -y install mod_ssl
[root@www ~]#
vi /etc/httpd/conf.d/ssl.conf
# line 59: uncomment

DocumentRoot "/var/www/html"
# line 60: uncomment and specify hostname

# line 102: change to the one created in [1]

# line 110: change to the one created in [1]

[root@www ~]#
systemctl restart httpd

[3] If you'd like to set HTTP connection to redirect to HTTPS (Always on SSL/TLS), configure each Virtualhost like follows.
It's OK to set it in [.htaccess] not in httpd.conf.
[root@www ~]#
vi /etc/httpd/conf.d/vhost.conf
<VirtualHost *:80>
    DocumentRoot /var/www/html
    ServerName www.srv.world
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

[root@www ~]#
systemctl restart httpd

[4] If Firewalld is running, allow HTTPS service. HTTPS uses 443/TCP.
[root@www ~]#
firewall-cmd --add-service=https --permanent

[root@www ~]#
firewall-cmd --reload

[5] Access to the test page from a client computer with a Web browser via HTTPS. The examample below is the Fiorefix. Following screen is shown because Certificates is own created one, but it's no ploblem, Proceed to next.
[6] Just Accessed on HTTPS.
Matched Content