The configuration of the Apache HTTP server is one of the most simple one which I have seen. You practically only:
The configuration files are located:
Configuration
root@dokuwiki httpd]# ls -lart total 20 drwxr-xr-x. 2 apache apache 4096 Jan 29 2018 error drwxr-xr-x. 2 root root 4096 Jul 4 03:37 conf lrwxrwxrwx. 1 root root 29 Jul 4 03:37 modules -> ../../usr/lib64/httpd/modules lrwxrwxrwx. 1 root root 19 Jul 4 03:37 logs -> ../../var/log/httpd lrwxrwxrwx. 1 root root 19 Jul 4 03:37 run -> ../../var/run/httpd drwxr-xr-x. 5 root root 4096 Jul 4 03:37 . drwxr-xr-x. 2 root root 4096 Aug 16 03:32 conf.d drwxr-xr-x. 97 root root 4096 Aug 17 06:44 .. [root@dokuwiki httpd]# pwd /etc/httpd [root@dokuwiki httpd]#
So let's get going
The Apache configuration is rather simple and it is located in the conf folder:
Apache Configuration Files
[root@dokuwiki conf]# pwd /etc/httpd/conf [root@dokuwiki conf]# ls -alrt total 56 -rw-r--r--. 1 root root 32363 Feb 7 2018 httpd.conf -rw-r--r--. 1 root root 13139 Jun 19 15:45 magic drwxr-xr-x. 2 root root 4096 Jul 4 03:37 . drwxr-xr-x. 5 root root 4096 Jul 4 03:37 .. [root@dokuwiki conf]#
The configuration the httpd.conf file contains information about the server admin, port on which it listens, log and error location and others:
Apache Configuration
<VirtualHost IP:80> ServerAdmin [email protected] DocumentRoot /etc/dokuwiki ServerName www.jdbwiki.tech ErrorLog logs/error_log CustomLog logs/access_log common </VirtualHost> <VirtualHost IP:443> ServerName www.jdbwiki.tech DocumentRoot /etc/dokuwiki ErrorLog logs/error_log CustomLog logs/access_log common </VirtualHost> This configuration is located in the configuration file:
The security configuration, as you might guess, contains data about SSL, Ciphers and others security configurations.
These files are located in the conf.d directory:
Security Configuration Files
[root@dokuwiki conf.d]# pwd /etc/httpd/conf.d [root@dokuwiki conf.d]# ls -lart total 44 -rw-r--r--. 1 root root 893 Jan 25 2018 dokuwiki.conf.rpmsave -rw-r--r--. 1 root root 9431 Jan 28 2018 ssl.conf -rw-r--r--. 1 root root 336 Jan 30 2018 jdbwiki.tech.conf.bkp -rw-r--r--. 1 root root 282 Jan 30 2018 .htaccess -rw-r--r--. 1 root root 299 Feb 19 11:24 welcome.conf -rw-r--r--. 1 root root 392 Jun 19 15:45 README drwxr-xr-x. 5 root root 4096 Jul 4 03:37 .. -rw-r--r--. 1 root root 1675 Aug 15 07:38 php.conf
It is possible to have the entire configuration in the httpd.conf file, but again for security reasons it is recommended to keep these configurations separate: