I would like to pursue the idea of disabling .htaccess completely for the sake of gaining a few microseconds on each page load. I know that it's mostly irrelevant, but I've found that every fraction of a second that I can save will result in a more pageviews per session, so it can't really hurt either.
I remember modifying httpd.conf manually a long time ago, and then some update along the way wiped out all of my settings! So I think it's best if I stick to modifying it through WHM, unless you guys tell me otherwise.
So my questions are:
1. When I compress the site using cPanel's "optimize", it plugs in <IfModule mod_deflate.c> data at /home/example/.htaccess. All of my accounts have the same compression settings, though (and always will), so can I set this globally for all accounts? Or does it have to be for each account manually? If I can set it globally, then where do I copy it?
2. Similarly, I want all of my sites to be forced to use HTTPS. Where do I set this globally? I know that I can do it for each account, but it's unnecessary work if I can just do it globally.
3. I have customized .htaccess data at /home/example/public_html/.htaccess that I should be able to easily modify and plug in to Apache. But I don't see anywhere in WHM or cPanel to do this for each account, I only have Pre Main Include, Pre VirtualHost Include, and Post VirtualHost Include.
I found this:
documentation.cpanel.net
Does this mean that I'm going to have to do it manually, anyway?
If so, looking at the documentation, the paths mentioned don't exist; I have /etc/apache2/conf.d, but the only directories after that are /includes, /modsec, /ssl.crt, and /ssl.key. Do I manually create /userdata/includename.conf (the actual word "userdata", I assume) and plug in global data there, then reboot and it will automagically recognize it?
Further, the documentation says that I can plug in domain-specific data at /etc/apache2/conf.d/userdata/ssl/2_4/user/domain/includename.conf. But the fact that it uses the Apache version in the path is a concern, what happens next time I update Apache? Do I have to modify the data for every single domain?
And am I correct that I would then have 2 copies of the data; one at /etc/apache2/conf.d/userdata/ssl/2_4/user/domain/includename.conf and another at /etc/apache2/conf.d/userdata/std/2_4/user/domain/includename.conf (one for SSL and one for STD)?
Finally, since it specifies the domain in the path, would the file here apply to all parked domains, too? Or do I have to create a separate file for every parked domain? Or would this be a case where I would use /etc/apache2/conf.d/userdata/ssl/2_4/user/includename.conf and set it for the user instead of the domain?
Are there any other issues I should know about before going further down this rabbit hole?
I remember modifying httpd.conf manually a long time ago, and then some update along the way wiped out all of my settings! So I think it's best if I stick to modifying it through WHM, unless you guys tell me otherwise.
So my questions are:
1. When I compress the site using cPanel's "optimize", it plugs in <IfModule mod_deflate.c> data at /home/example/.htaccess. All of my accounts have the same compression settings, though (and always will), so can I set this globally for all accounts? Or does it have to be for each account manually? If I can set it globally, then where do I copy it?
2. Similarly, I want all of my sites to be forced to use HTTPS. Where do I set this globally? I know that I can do it for each account, but it's unnecessary work if I can just do it globally.
3. I have customized .htaccess data at /home/example/public_html/.htaccess that I should be able to easily modify and plug in to Apache. But I don't see anywhere in WHM or cPanel to do this for each account, I only have Pre Main Include, Pre VirtualHost Include, and Post VirtualHost Include.
I found this:
Modify Apache Virtual Hosts with Include Files - EasyApache 4 - cPanel Documentation
Does this mean that I'm going to have to do it manually, anyway?
If so, looking at the documentation, the paths mentioned don't exist; I have /etc/apache2/conf.d, but the only directories after that are /includes, /modsec, /ssl.crt, and /ssl.key. Do I manually create /userdata/includename.conf (the actual word "userdata", I assume) and plug in global data there, then reboot and it will automagically recognize it?
Further, the documentation says that I can plug in domain-specific data at /etc/apache2/conf.d/userdata/ssl/2_4/user/domain/includename.conf. But the fact that it uses the Apache version in the path is a concern, what happens next time I update Apache? Do I have to modify the data for every single domain?
And am I correct that I would then have 2 copies of the data; one at /etc/apache2/conf.d/userdata/ssl/2_4/user/domain/includename.conf and another at /etc/apache2/conf.d/userdata/std/2_4/user/domain/includename.conf (one for SSL and one for STD)?
Finally, since it specifies the domain in the path, would the file here apply to all parked domains, too? Or do I have to create a separate file for every parked domain? Or would this be a case where I would use /etc/apache2/conf.d/userdata/ssl/2_4/user/includename.conf and set it for the user instead of the domain?
Are there any other issues I should know about before going further down this rabbit hole?