EasyApache4 - "/etc/apache2/" and "/etc/httpd/" - why do BOTH directories exist? (CentOS)
Hi. I am just curious and trying to understand cPanel's webserver configuration better....
I know that, normally, Apache configuration is located in
on CentOS. However, I see that EasyApache 4 sets the httpd root to
instead (as it would be in Debian, et cetera), which is fine. The thing is, I am looking at my server and I see BOTH directories.
contains all the EA config, while
seems to just contain some default config that is not even used. My question is: is the
directory being used for anything? And, if not, then why was it created? May I remove it?
/etc/httpd/on CentOS. However, I see that EasyApache 4 sets the httpd root to
/etc/apache2/instead (as it would be in Debian, et cetera), which is fine. The thing is, I am looking at my server and I see BOTH directories.
/etc/apache2/contains all the EA config, while
/etc/httpd/seems to just contain some default config that is not even used. My question is: is the
/etc/httpd/directory being used for anything? And, if not, then why was it created? May I remove it?
-
Hey there! On a default cPanel installation (I checked an AlmaLinux 8 machine) I do not see the /etc/httpd directory. You could always run this command to see what, if anything, created it, or if it was included by your hosts OS image: rpm -qf /etc/httpd/some_file_in_there That will check the RPM database and see if it that file is linked with any package that was installed. 0 -
As a follow-up to that, you will also see /usr/local/apache on cPanel machines, as that is leftover from legacy code, but it's just a series of links to other areas at this point. 0 -
Thank you! Yeah, this folder doesn't have any symlinks other than the usual ones, so it doesn't seem to be there for legacy's sake. Interestingly enough, it says: file /etc/httpd/conf/httpd.conf is not owned by any package I wonder how it got there? I won't remove it, but I guess it would be safe to do so. 0 -
Whenever I want to delete a file, I don't. I rename it to current_filename.bak and then see if anything breaks so I can easily put it back if necessary. As long as it isn't some huge logfile that is causing space issues, that usually is a good method. 0 -
For reference, here's the contents of the (apparently unused) httpd folder: .: conf/ conf.d/ conf.modules.d/ logs -> ../../var/log/httpd/ modules -> ../../usr/lib64/httpd/modules/ run -> /run/httpd/ ./conf: httpd.conf magic ./conf.d: autoindex.conf mpm_prefork.conf README userdir.conf welcome.conf ./conf.modules.d: 00-base.conf 00-dav.conf 00-lua.conf 00-mpm.conf 00-proxy.conf 00-systemd.conf 01-cgi.conf 0 -
Whenever I want to delete a file, I don't. I rename it to current_filename.bak and then see if anything breaks so I can easily put it back if necessary. As long as it isn't some huge logfile that is causing space issues, that usually is a good method.
You are right, of course, that's what I meant to say...;)0
Please sign in to leave a comment.
Comments
6 comments