Personally, I place all my vhosts configuration files in /etc/httpd/conf.d/vhosts/. There're certain users that like to mimic the environment of debian/ubuntu by creating folders like site-enabled and site-available.
Is there any other ways by which the configuration files can be managed more efficiently ?
What's the best approach for managing Apache virtual hosts configuration files ?
Re: What's the best approach for managing Apache virtual hosts configuration files ?
this is a matter of personal choice
i don´t like debian stile although a need to support some
i use /etc/httpd/conf.d/ and /etc/httpd/disabled
we have another environment here with /etc/httpd/sites for http and /etc/httpd/ssl for https because is a farm of servers and confs are links at an NFS share
i don´t like debian stile although a need to support some
i use /etc/httpd/conf.d/ and /etc/httpd/disabled
we have another environment here with /etc/httpd/sites for http and /etc/httpd/ssl for https because is a farm of servers and confs are links at an NFS share
- KernelOops
- Posts: 428
- Joined: 2013/12/18 15:04:03
- Location: xfs file system
Re: What's the best approach for managing Apache virtual hosts configuration files ?
In CentOS 7, I used /etc/httpd/conf.d like BShT above mentioned.
In CentOS 8, I use the new and awesome instance feature, for example, if I create the virtual host like:
/etc/httpd/conf/example.tld.conf
then I can instantly use commands like:
systemctl enable httpd@example.tld
systemctl start httpd@example.tld
systemctl status httpd@example.tld
how awesome is that?
In CentOS 8, I use the new and awesome instance feature, for example, if I create the virtual host like:
/etc/httpd/conf/example.tld.conf
then I can instantly use commands like:
systemctl enable httpd@example.tld
systemctl start httpd@example.tld
systemctl status httpd@example.tld
how awesome is that?
--
R.I.P. CentOS
--
R.I.P. CentOS
--
Re: What's the best approach for managing Apache virtual hosts configuration files ?
There are tools for management of configuration. Some examples are listed in https://wiki.centos.org/SpecialInterest ... agementSIG
The idea of those tools is that you have the config in syntax of the tool and the tool transfers the config to target system / ensures that target has the config.
The benefit is that you have the config in two locations: your "management centre" and the target system. That makes it simpler to reinstall a target system.
The idea of those tools is that you have the config in syntax of the tool and the tool transfers the config to target system / ensures that target has the config.
The benefit is that you have the config in two locations: your "management centre" and the target system. That makes it simpler to reinstall a target system.
Re: What's the best approach for managing Apache virtual hosts configuration files ?
Indeed, that is an awesome feature, but each instance is a new set of processes, while multiple vhosts shared the same set of processes.KernelOops wrote: ↑2020/10/01 13:24:23In CentOS 8, I use the new and awesome instance feature, for example, if I create the virtual host like:
This can have very different memory consumption if you have a lot of instances/vhosts
- KernelOops
- Posts: 428
- Joined: 2013/12/18 15:04:03
- Location: xfs file system
Re: What's the best approach for managing Apache virtual hosts configuration files ?
Exactly, each instance is a separate set of processes, which is what I want, for isolation and separation, providing another layer of security.
I use the main httpd configuration to act as a reverse proxy (and caching service) for all the backend instances. I've seen great results with this layout over the more traditional method that I still use in CentOS 7.
I believe the only real downside, is a bit more memory usage for the extra processes that are needed, but that is a small price to pay for the overall performance and security benefits.
I use the main httpd configuration to act as a reverse proxy (and caching service) for all the backend instances. I've seen great results with this layout over the more traditional method that I still use in CentOS 7.
I believe the only real downside, is a bit more memory usage for the extra processes that are needed, but that is a small price to pay for the overall performance and security benefits.
--
R.I.P. CentOS
--
R.I.P. CentOS
--