How to enable or disable Apache modules in a distro-agnostic way?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












2














I usually work with Debian/Ubuntu as a basis for Apache and recently learned that commands like a2enmod MOD or a2dismod MOD are Debian-specific.



Is there a global / distro-agnostic way (maybe with some CM like Ansible or another) to enable or disable modules?



All I personally enable is http2, deflate and expires (and I use them all-default).










share|improve this question























  • github.com/PeterMosmans/ansible-role-apache2 might be helpful
    – Jeff Schaller
    Dec 27 '18 at 14:22






  • 1




    Note that Ansible module itself would need to be updated if/when Apache's configuration directives change, so you're back on the hamster wheel.
    – Jeff Schaller
    Dec 27 '18 at 14:25










  • See also github.com/correcthorse/ansible-httpd
    – Jeff Schaller
    Dec 27 '18 at 14:27










  • @JeffSchaller regarding your second comment, do you mean to a "minor" update from say 2.4 to 2.6 or to something else?
    – JohnDoea
    Dec 27 '18 at 14:42











  • if Apache ends up at version 3, and Debian eventually stops aliasing a2enmod to a3enmod, then eventually the playbook stops working because it's trying to use a2enmod.
    – Jeff Schaller
    Dec 27 '18 at 14:57















2














I usually work with Debian/Ubuntu as a basis for Apache and recently learned that commands like a2enmod MOD or a2dismod MOD are Debian-specific.



Is there a global / distro-agnostic way (maybe with some CM like Ansible or another) to enable or disable modules?



All I personally enable is http2, deflate and expires (and I use them all-default).










share|improve this question























  • github.com/PeterMosmans/ansible-role-apache2 might be helpful
    – Jeff Schaller
    Dec 27 '18 at 14:22






  • 1




    Note that Ansible module itself would need to be updated if/when Apache's configuration directives change, so you're back on the hamster wheel.
    – Jeff Schaller
    Dec 27 '18 at 14:25










  • See also github.com/correcthorse/ansible-httpd
    – Jeff Schaller
    Dec 27 '18 at 14:27










  • @JeffSchaller regarding your second comment, do you mean to a "minor" update from say 2.4 to 2.6 or to something else?
    – JohnDoea
    Dec 27 '18 at 14:42











  • if Apache ends up at version 3, and Debian eventually stops aliasing a2enmod to a3enmod, then eventually the playbook stops working because it's trying to use a2enmod.
    – Jeff Schaller
    Dec 27 '18 at 14:57













2












2








2


1





I usually work with Debian/Ubuntu as a basis for Apache and recently learned that commands like a2enmod MOD or a2dismod MOD are Debian-specific.



Is there a global / distro-agnostic way (maybe with some CM like Ansible or another) to enable or disable modules?



All I personally enable is http2, deflate and expires (and I use them all-default).










share|improve this question















I usually work with Debian/Ubuntu as a basis for Apache and recently learned that commands like a2enmod MOD or a2dismod MOD are Debian-specific.



Is there a global / distro-agnostic way (maybe with some CM like Ansible or another) to enable or disable modules?



All I personally enable is http2, deflate and expires (and I use them all-default).







debian apache-httpd configuration ansible distributions






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 27 '18 at 13:49







JohnDoea

















asked Dec 27 '18 at 13:05









JohnDoeaJohnDoea

1171132




1171132











  • github.com/PeterMosmans/ansible-role-apache2 might be helpful
    – Jeff Schaller
    Dec 27 '18 at 14:22






  • 1




    Note that Ansible module itself would need to be updated if/when Apache's configuration directives change, so you're back on the hamster wheel.
    – Jeff Schaller
    Dec 27 '18 at 14:25










  • See also github.com/correcthorse/ansible-httpd
    – Jeff Schaller
    Dec 27 '18 at 14:27










  • @JeffSchaller regarding your second comment, do you mean to a "minor" update from say 2.4 to 2.6 or to something else?
    – JohnDoea
    Dec 27 '18 at 14:42











  • if Apache ends up at version 3, and Debian eventually stops aliasing a2enmod to a3enmod, then eventually the playbook stops working because it's trying to use a2enmod.
    – Jeff Schaller
    Dec 27 '18 at 14:57
















  • github.com/PeterMosmans/ansible-role-apache2 might be helpful
    – Jeff Schaller
    Dec 27 '18 at 14:22






  • 1




    Note that Ansible module itself would need to be updated if/when Apache's configuration directives change, so you're back on the hamster wheel.
    – Jeff Schaller
    Dec 27 '18 at 14:25










  • See also github.com/correcthorse/ansible-httpd
    – Jeff Schaller
    Dec 27 '18 at 14:27










  • @JeffSchaller regarding your second comment, do you mean to a "minor" update from say 2.4 to 2.6 or to something else?
    – JohnDoea
    Dec 27 '18 at 14:42











  • if Apache ends up at version 3, and Debian eventually stops aliasing a2enmod to a3enmod, then eventually the playbook stops working because it's trying to use a2enmod.
    – Jeff Schaller
    Dec 27 '18 at 14:57















github.com/PeterMosmans/ansible-role-apache2 might be helpful
– Jeff Schaller
Dec 27 '18 at 14:22




github.com/PeterMosmans/ansible-role-apache2 might be helpful
– Jeff Schaller
Dec 27 '18 at 14:22




1




1




Note that Ansible module itself would need to be updated if/when Apache's configuration directives change, so you're back on the hamster wheel.
– Jeff Schaller
Dec 27 '18 at 14:25




Note that Ansible module itself would need to be updated if/when Apache's configuration directives change, so you're back on the hamster wheel.
– Jeff Schaller
Dec 27 '18 at 14:25












See also github.com/correcthorse/ansible-httpd
– Jeff Schaller
Dec 27 '18 at 14:27




See also github.com/correcthorse/ansible-httpd
– Jeff Schaller
Dec 27 '18 at 14:27












@JeffSchaller regarding your second comment, do you mean to a "minor" update from say 2.4 to 2.6 or to something else?
– JohnDoea
Dec 27 '18 at 14:42





@JeffSchaller regarding your second comment, do you mean to a "minor" update from say 2.4 to 2.6 or to something else?
– JohnDoea
Dec 27 '18 at 14:42













if Apache ends up at version 3, and Debian eventually stops aliasing a2enmod to a3enmod, then eventually the playbook stops working because it's trying to use a2enmod.
– Jeff Schaller
Dec 27 '18 at 14:57




if Apache ends up at version 3, and Debian eventually stops aliasing a2enmod to a3enmod, then eventually the playbook stops working because it's trying to use a2enmod.
– Jeff Schaller
Dec 27 '18 at 14:57










2 Answers
2






active

oldest

votes


















3





+25









The platform independent way would in general be an adding of the according LoadModule directives to your Apache configuration. What a2enmod does, is linking files with such directives (.load files, plus additional .conf files, if needed) from /etc/apache2/mods-available to /etc/apache2/mods-enabled






share|improve this answer






















  • Hello, I misunderstand why you didn't allow thew line break. The answer seems to me to contain two different passages in one passages. It is an accessibility issue, as I see it, to split it to two passages. Thank you.
    – JohnDoea
    Dec 30 '18 at 15:29


















0














The platform independent in general is not using platform specific tooling.






share|improve this answer
















  • 1




    Hello poiege, I don't want to use any platform specific tooling. What would be an example or general tooling? Please edit to explain an example.
    – JohnDoea
    Dec 31 '18 at 10:29










  • Go docker!!!!11
    – poige
    Dec 31 '18 at 11:59










Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f491123%2fhow-to-enable-or-disable-apache-modules-in-a-distro-agnostic-way%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









3





+25









The platform independent way would in general be an adding of the according LoadModule directives to your Apache configuration. What a2enmod does, is linking files with such directives (.load files, plus additional .conf files, if needed) from /etc/apache2/mods-available to /etc/apache2/mods-enabled






share|improve this answer






















  • Hello, I misunderstand why you didn't allow thew line break. The answer seems to me to contain two different passages in one passages. It is an accessibility issue, as I see it, to split it to two passages. Thank you.
    – JohnDoea
    Dec 30 '18 at 15:29















3





+25









The platform independent way would in general be an adding of the according LoadModule directives to your Apache configuration. What a2enmod does, is linking files with such directives (.load files, plus additional .conf files, if needed) from /etc/apache2/mods-available to /etc/apache2/mods-enabled






share|improve this answer






















  • Hello, I misunderstand why you didn't allow thew line break. The answer seems to me to contain two different passages in one passages. It is an accessibility issue, as I see it, to split it to two passages. Thank you.
    – JohnDoea
    Dec 30 '18 at 15:29













3





+25







3





+25



3




+25




The platform independent way would in general be an adding of the according LoadModule directives to your Apache configuration. What a2enmod does, is linking files with such directives (.load files, plus additional .conf files, if needed) from /etc/apache2/mods-available to /etc/apache2/mods-enabled






share|improve this answer














The platform independent way would in general be an adding of the according LoadModule directives to your Apache configuration. What a2enmod does, is linking files with such directives (.load files, plus additional .conf files, if needed) from /etc/apache2/mods-available to /etc/apache2/mods-enabled







share|improve this answer














share|improve this answer



share|improve this answer








edited Dec 30 '18 at 14:30

























answered Dec 29 '18 at 20:49









JaleksJaleks

1,429424




1,429424











  • Hello, I misunderstand why you didn't allow thew line break. The answer seems to me to contain two different passages in one passages. It is an accessibility issue, as I see it, to split it to two passages. Thank you.
    – JohnDoea
    Dec 30 '18 at 15:29
















  • Hello, I misunderstand why you didn't allow thew line break. The answer seems to me to contain two different passages in one passages. It is an accessibility issue, as I see it, to split it to two passages. Thank you.
    – JohnDoea
    Dec 30 '18 at 15:29















Hello, I misunderstand why you didn't allow thew line break. The answer seems to me to contain two different passages in one passages. It is an accessibility issue, as I see it, to split it to two passages. Thank you.
– JohnDoea
Dec 30 '18 at 15:29




Hello, I misunderstand why you didn't allow thew line break. The answer seems to me to contain two different passages in one passages. It is an accessibility issue, as I see it, to split it to two passages. Thank you.
– JohnDoea
Dec 30 '18 at 15:29













0














The platform independent in general is not using platform specific tooling.






share|improve this answer
















  • 1




    Hello poiege, I don't want to use any platform specific tooling. What would be an example or general tooling? Please edit to explain an example.
    – JohnDoea
    Dec 31 '18 at 10:29










  • Go docker!!!!11
    – poige
    Dec 31 '18 at 11:59















0














The platform independent in general is not using platform specific tooling.






share|improve this answer
















  • 1




    Hello poiege, I don't want to use any platform specific tooling. What would be an example or general tooling? Please edit to explain an example.
    – JohnDoea
    Dec 31 '18 at 10:29










  • Go docker!!!!11
    – poige
    Dec 31 '18 at 11:59













0












0








0






The platform independent in general is not using platform specific tooling.






share|improve this answer












The platform independent in general is not using platform specific tooling.







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 31 '18 at 8:02









poigepoige

4,0521543




4,0521543







  • 1




    Hello poiege, I don't want to use any platform specific tooling. What would be an example or general tooling? Please edit to explain an example.
    – JohnDoea
    Dec 31 '18 at 10:29










  • Go docker!!!!11
    – poige
    Dec 31 '18 at 11:59












  • 1




    Hello poiege, I don't want to use any platform specific tooling. What would be an example or general tooling? Please edit to explain an example.
    – JohnDoea
    Dec 31 '18 at 10:29










  • Go docker!!!!11
    – poige
    Dec 31 '18 at 11:59







1




1




Hello poiege, I don't want to use any platform specific tooling. What would be an example or general tooling? Please edit to explain an example.
– JohnDoea
Dec 31 '18 at 10:29




Hello poiege, I don't want to use any platform specific tooling. What would be an example or general tooling? Please edit to explain an example.
– JohnDoea
Dec 31 '18 at 10:29












Go docker!!!!11
– poige
Dec 31 '18 at 11:59




Go docker!!!!11
– poige
Dec 31 '18 at 11:59

















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f491123%2fhow-to-enable-or-disable-apache-modules-in-a-distro-agnostic-way%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?