Skip to main content

Configuring a bare bones Apache HTTPD web server

By April 12, 2013September 12th, 2022No Comments

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.

		User apache
		Group apache
		ErrorLog /var/log/httpd/error.log
		LoadModule authz_host_module modules/
		LoadModule dir_module modules/
		DirectoryIndex index.html
		DocumentRoot /var/www/html
		<Directory /var/www/html>
        	AllowOverride None
        	Order allow,deny
        	allow from