EX200 Exam QuestionsBrowse all questions from this exam

EX200 Exam - Question 67


SIMULATION -

You have a domain named www.rhce.com associated IP address is 192.100.0.2. Configure the Apache web server by implementing the SSL for encryption communication.

Show Answer
Correct Answer:

To configure the Apache web server with SSL for encrypted communication on the www.rhce.com domain with IP address 192.100.0.2, follow these steps: 1) Install the mod_ssl module if not already installed: `yum install mod_ssl`. 2) Ensure the HTTP daemon is enabled and running: `systemctl enable --now httpd`. 3) Verify that the SSL module is running: `apachectl -M | grep ssl`. 4) Open the firewall for HTTPS access: `firewall-cmd --zone=public --add-service=https --permanent` and then reload the firewall: `firewall-cmd --reload`. 5) Generate the SSL certificate and key using OpenSSL: `openssl req -newkey rsa:2048 -nodes -keyout /etc/pki/tls/private/httpd.key -x509 -days 365 -out /etc/pki/tls/certs/httpd.crt`. 6) Edit the Apache SSL configuration file: `vim /etc/httpd/conf.d/ssl.conf` and add the following lines: `SSLCertificateFile /etc/pki/tls/certs/httpd.crt`, `SSLCertificateKeyFile /etc/pki/tls/private/httpd.key`, `<VirtualHost 192.100.0.2:443>`, `DocumentRoot "/var/www/html"`, `ServerName www.rhce.com:443`, `</VirtualHost>`. 7) Create the necessary directory and index page on the specified path (you can download the index page from ftp://server1.example.com during the exam). 8) Finally, restart the Apache service for changes to take effect: `systemctl restart httpd`. This setup ensures the necessary SSL configurations are made and the web server can communicate securely over HTTPS.

Discussion

3 comments
Sign in to comment
Oyform
Oct 1, 2021

i thought httpd is not in rhcsa 2021

STFN2019
Sep 23, 2021

https://linuxconfig.org/how-to-install-mod-ssl-on-redhat-8

STFN2019
Sep 23, 2021

Simply use mod_ssl module and then generated self-signed SSL cert, job done.

kenkct
Mar 11, 2022

$ sudo su # yum install mod_ssl (install ssl module) # system enable --now httpd (enable http daemon) # apachectl -M | grep ssl (verify ssl is running) # firewall-cmd zone=public --add-service=https --permanent (allow https access) # firewall-cmd --reload (firewall take effect) # openssl req -newkey rsa:2048 -nodes -keyout /etc/pki/tls/private/httpd.key -x509 -days 365 -out /etc/pki/tls/certs/httpd.crt # vim /etc/httpd/conf.d/ssl.conf SSLCertificateFile /etc/pki/tls/certs/httpd.crt SSLCertificateKeyFile /etc/pki/tls/private/httpd.key <VirtualHost 192.100.0.2:443> DocumentRoot "/var/www/html" Servername www.rhce.com:443 # systemctl reload httpd