So many times I feel that administrators install the Apache web server and are happy to see it running and leave it at that. Now, I do understand that if the goal was to get the web server running then the task has been achieved. However, if the goal was to have the web server run securely and efficiently then this may not have been achieved. More importantly, have you understood what you have done?
In this video we install the Apache HTTPD web server onto CentOS Linux and replace the system supplied configuration with out own httpd.conf created from scratch to give us the bares bones configuration we need to run the web server. I know it is not much but we will reduce the loaded Apache modules from 57 to 6 and the memory used from 6MB to 2MB. We also reduce the httpd.conf from 1009 lines to just 14 lines.
Listen 0.0.0.0:80 User apache Group apache ServerName www.example.com ErrorLog /var/log/httpd/error.log LoadModule authz_host_module modules/mod_authz_host.so LoadModule dir_module modules/mod_dir.so DirectoryIndex index.html DocumentRoot /var/www/html <Directory /var/www/html> AllowOverride None Order allow,deny allow from 192.168.0.0/24 </Directory>