The current set-up for my web server is a 1GB nanode using Fedora37 as the distribution for the compute instance. For the web server I am using Httpd (Apache 2.4.54), and am now in the process of configuring virtual hosting. I have read several different guides on Linode and other sites. Some of them say to configure virtual hosting in:
/etc/httpd/sites-available/example.com.conf
and /etc/httpd/sites-enabled/example.com.conf
,
while others suggest putting all non-standard configuration files in /etc/httpd/conf.d/
putting virtual hosting in /etc/httpd/conf.d/vhost.conf
I found another conversation on this topic here at server fault at Difference in sites-available vs sites-enabled vs conf.d directories (Nginx)?. However, it is in regards to nginx which I am not using and there was no clear answer. Also, the question was asked 9 years ago, so I am wondering if anything has changed since then.
I originally set up the virtual hosting in sites-available and sites-enabled as per this guide on Linode:https://www.linode.com/docs/guides/how-to-install-apache-web-server-centos-8/#configure-virtual-hosting It is for CentOS, but the steps should be generally compatible with Fedora.
However, then I ran into this guide: https://www.linode.com/docs/guides/lamp-server-on-fedora-20/ which uses the vhost.conf method. The guide is for setting up a LAMP server on Fedora, which I would like to do.
My question is, where should I put my configuration files for virtual hosting? What would be the 'best practice' in this case? Do I need to set up the configuration in both places? If I wanted to set up a LAMP server, would I have to use the vhost.conf method? Are these methods interchangeable?
Please let me know if there is any additional information needed in order to answer the question. Thank you for your time and patience - catbyte