Editing the configuration file for apache - CentOS 7

Let's edit the configuration file for apache, the global location of the configuration file for apache is as follows

/etc/httpd/conf/httpd.conf

Let's edit it with vi.

sudo vi /etc/httpd/conf/httpd.conf

Directory where you can add your apache configuration

Editing global configuration files can be a bit scary.

In apache, a configuration directory is prepared for additional configuration.

/etc/httpd/conf/conf.d

If you place a file with the extension ".conf" in this directory, it will be loaded automatically.

For example, if you place a configuration file for a virtual host, the file name should look like the following

vhost.conf

Associated Information