0% found this document useful (0 votes)
0 views

Apache server configuration

The document outlines the configuration steps for setting up an Apache server on RHEL, including installation, service activation, and firewall configuration. It also details the process for hosting multiple websites using SSL certificates, including hostname setup, SSL file management, and necessary firewall adjustments. Finally, it emphasizes the importance of verifying configurations and restarting the Apache service to apply changes.

Uploaded by

raor41101
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Apache server configuration

The document outlines the configuration steps for setting up an Apache server on RHEL, including installation, service activation, and firewall configuration. It also details the process for hosting multiple websites using SSL certificates, including hostname setup, SSL file management, and necessary firewall adjustments. Finally, it emphasizes the importance of verifying configurations and restarting the Apache service to apply changes.

Uploaded by

raor41101
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

RHEL Server Configuration:-

* Apache Server Configuration:-


#dnf install -y httpd - first we need to install the httpd packages
#after installing the httpd package in - cd /var/www/html/ - directory will create
automatic
# in /var/www/html/ create a file through VI editor- filename should be .html
formate or put your code in this /var/www/html/ directory
#systemctl enable httpd.service --now - to activate the service
#systemctl status httpd.service - to checke the stauss
#to add http in firewall- #firewall-cmd --permanent --add-service=http --
zone=public or private
#firewall-cmd --reload
#firewall-cmd --list-all to verify the services are present
#curl localhost or curl http://server ipadd - to check we have loaded the http is
working or not.
# or check from the browser to verify its working or not.
#cp -r * .. for copy to parents directory
#after this restart the httpd.service.

* Hosting Multiple Web-site on Apache server using ssl-certificates.


# set static hostname- using hostnamectl set-hostname
#2nd - install the httpd, openssl,mod_ssl using cmnd-#dnf install -y httpd openssl
mod_ssl
#4th - copy the generated file from the cuurent to /etc/pki/tls/certs/ using copy
cmmnd- #cp -r filename.crt /etc/pki/tls/certs/
2nd file copy the same directory /etc/pki/tls/private/ using cmd - #cp -r
filename.key /etc/pki/tls/private
#5th - to verify the generated ssl cert file is there in httpd using cmmnd #cat
/etc/httpd/conf.d/ssl.conf | grep localhost(filename)
#httpd -t - to check syntex is correct
#6th - in vim editor you need to define the path of that website using the below
scripts
#httpd -t to check the syntex is oky
#create dir in html
7th - in firewall add the https using cmnd #firewall-cmd --permanent --add-
service=https --zone=public
#firewall-cmd --permanent --add-
port=443/tcp --zone=public
#firewall-cmd --
reload
#firewall-cmd --list-
all - to verify the services
#systemctl enable httpd --now - to start the services
# vi /etc/host -- enter the ipadd & website using

#restart the httpd service using systemctl restart httpd

You might also like