Again, our custom Apache configurations got lost after the WHM/cPanel automatic upgrade

virtualreality

Well-Known Member
Jan 18, 2008
87
1
58
This is a long-time issue. Each time when WHM/cPanel was automatically upgraded to a new version, our custom Apache configurations that we had spent much time and researched many resources online to build were lost. The Apache settings have automatically become primitive, not-customized and not-optimized. Originally we used EasyApache 4 to compile Apache server, and we have built custom Apache configurations via /etc/apache2/conf/httpd.conf, saved the custom Apache configurations and restarted the Apache server via systemctl restart httpd.service (We use CentOS 7.9 Linux). Often, we feel confused why our custom Apache configurations have disappeared after WHM/cPanel upgrades. Is there an effective way to keep the custom Apache configurations now?

A long time ago when there was a way (Run the Apache Configuration Distiller Script: /usr/local/cpanel/bin/apache_conf_distiller --update) to retain the custom Apache configurations, we found many of our custom Apache configurations still remained there and were not affected after the WHM/cPanel upgrdaes.

We always select the STABLE Tier in the WHM Update Preferences, but after the WHM/cPanel was automatically upgraded from v94.0.4 to v94.0.5 this time, we've found some errors/misconfigurations have appeared again in the new Apache settings. For example, we have NEVER selected suphp_module, suexec_module and ruid2_module when we compiled Apache server via EasyApache 4, but every time after the WHM/cPanel upgrade, suphp_module, suexec_module and ruid2_module have come to our Apache settings and become active there. Our web hosting company does not impose these modules on our hosting account. How come these unnecessary modules come to the Apache settings after the WHM/cPanel upgrade? We do not need and do not like suphp_module, suexec_module and uid2_module at all. Like many other companies using WHM/cPanel to serve their own business websites only, we do the same, using the WHM/cPanel to only serve our own business website, never serving someone else's website. We do not do web hosting. We'll never do web hosting. Frankly, some "popular" features in WHM/cPanel may be important or attractive to people who do web hosting, but not to us who run solo business website and do not do web hosting.

On the other hand, sometimes we've found with automatic WHM/cPanel upgrades, there are some conflicts among applications, making our server and website unstable or disabled: our webpages cannot be opened or there are PHP or MySQL DB errors on our webpages. Frankly, we feel really worried about WHM/cPanel upgrades.

Like many other businesses who put STABILITY first in business operations and in running business websites, we are the same, putting STABILITY first for our business website. We prefer to get rid of those fancy, "popular", actually unnecessary and unstable server and website stuffs, to maintain the STABILITY of our server and our business website.

There is no perfect software in the world. Even the software is a new version, still there are new errors, new loopholes, new incompatibilities or new weaknesses in the software.

Please do not favor software new versions easily.

Again, we really want to know: Is there an effective way to keep the custom Apache configurations now?

Sincerely hope there is an effective way to keep the custom Apache configurations.
 
Last edited:

dalem

Well-Known Member
PartnerNOC
Oct 24, 2003
2,980
156
368
SLC
cPanel Access Level
DataCenter Provider
You should be saving your custom apache configurations in the
/etc/apache2/conf.d/ for global & /usr/local/apache/conf/userdata/std/ for a specific user




we have custom apache configs none of them get over written
 
  • Like
Reactions: cPRex

virtualreality

Well-Known Member
Jan 18, 2008
87
1
58
Hi dalem,

Thank you very much for help!

Just now, I've tried the way you mentioned via SSH to /etc/apache2/conf.d/, but all nothing there:

nano /etc/apache2/conf.d/httpd.conf - Blank, nothing is there (SSH says: New File)

nano /etc/apache2/conf.d/.conf - Blank, nothing is there (SSH says: New File)

Just test checking this: nano /etc/apache2/conf.d/ - Blank, nothing is there (SSH says: [ "/etc/apache2/conf.d/" is a directory ])

Would you please just show here the whole route based on /etc/apache2/conf.d/ that you've found it workable?

I checked the Advanced Apache Configuration cPanel webpage(s) several times before, and I've found the only route that shows the Apache server configurations file after the EasyApache 4 compilation is /etc/apache2/conf/httpd.conf where I can rebuild the Apache configurations via nano /etc/apache2/conf/httpd.conf , but the custom Apache configurations have got overwritten with the WHM/cPanel upgrades again and again. All the custom, optimized Apache configurations from our hard working are gone.
 
Last edited:

dalem

Well-Known Member
PartnerNOC
Oct 24, 2003
2,980
156
368
SLC
cPanel Access Level
DataCenter Provider
You actually have to save them here /etc/apache2/conf.d/ editing the /etc/apache2/conf/httpd.conf will do nothing ea4 does not know what to do with them there

cpanel will automatically search for your custom directives
with the include statement Include "/etc/apache2/conf.d/*.conf" form /etc/apache2/conf/httpd.conf
You can name them anything you like as long as they end with .conf

there should be some in there by default your using the wrong command
nano /etc/apache2/conf.d/*.conf

if you made no custom directives there will be 0 that you created
cpnael will add some under certain configurations & so will cloudLinux


I have at least 12 configurations we created on some servers all work fine
 

virtualreality

Well-Known Member
Jan 18, 2008
87
1
58
Please get it straight:

Would you please just show here the "default example" whole route based on /etc/apache2/conf.d/ that you've found it workable and use now?
 
Last edited:

virtualreality

Well-Known Member
Jan 18, 2008
87
1
58
nano /etc/apache2/conf.d/*.conf - there should be some in there by default...

Would you please just share here with the default command(s) that you've found it workable and use now? Thanks!
 
Last edited:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,871
601
273
cPanel Access Level
Root Administrator
@virtualreality - it has never been acceptable to edit the Apache configuration directly on any cPanel version. Even back in the days of the distiller, that just moved customizations to other files automatically.

You'll want to review the details here, as this explains how you can add things globally or only to specific virtual hosts:


Can you review that guide and see if that answers your questions on this?
 
Thread starter Similar threads Forum Replies Date
WebHostPro User Experience 0