Below are the steps to change document root in Apache(Web server) configurations - [root@rhcsa107 rakesh]# mkdir /web [root@rhcsa107 rakesh]# ls -ld /web/ drwxr-xr-x. 2 root root 22 Apr 3 08:45 /web/ [root@rhcsa107 rakesh]# vim /etc/httpd/conf.d/rakesh.conf DocumentRoot /web <Directory /web> Require all granted </Directory> Save exit from from this file. [root@rhcsa107 rakesh]# systemctl restart httpd.service Check HTTPD status, it must be running as below - [root@rhcsa107 rakesh]# systemctl status httpd.service ● httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled) Active: active (running) since Fri 2020-04-03 09:19:46 EDT; 6min ago Docs: man:httpd.service(8) Main PID: 10064 (httpd) Status: "Total requests: 5; Idle/Busy workers 100/0;Requests/sec: 0.0129; Bytes served/sec: 9 B/sec" ...
Hello! Welcome to my Technical blog. My Name is Rakesh Kumar and I’ve more than 7 years of experience in Linux and Open Source technologies. If you are looking for technical information about Linux(Server Hardening, Diagnostics & Troubleshooting etc), Ansible, OpenStack Cloud Solution, Containers(K8s/OCP), DevOps, Machine Learning and Nagios Event Monitoring tool.... you have come to the right place. "I believe Learning and earning shouldn't stop", This is my story!