Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

What are the terminal commands used to enable and disable Apache2 modules?

Update: Since the commands appear to differ based on distribution, I have made this question a community wiki where hopefully each poster can indicate the commands they use along with the pertinent distributions in which they work.

share|improve this question
    
The commands are different on different distros. Ubuntu/Debian is different from CentOS/RHEL, which is different then FreeBSD, etc. Please add a tag to indicate what distro you are using. –  Stefan Lasiewski Aug 21 '10 at 18:22
    
... just change the config ... –  xenoterracide Aug 21 '10 at 19:03
    
If you're going to make the post CW, don't choose an answer. –  gvkv Aug 21 '10 at 19:18
    
@gvkv - Fair enough. I removed the accepted answer. –  Noah Goodrich Aug 21 '10 at 19:41
    
I don't want to sound like I'm scolding you, it's just that CW is for questions that can have no best answer. If you asked "What commands ... on Ubuntu ..." then feel free to choose the best. –  gvkv Aug 21 '10 at 20:07
add comment

1 Answer

On debian / ubuntu you need to look at a2enmod and a2dismod. There are similar tools for toggling site configurations too (a2ensite and a2dissite).

share|improve this answer
    
I think a2enmod and a2dismod are on all platforms that carry apache. I can comfirm openSUSE at least –  decriptor Aug 21 '10 at 17:36
    
@dec Gentoo doesn't have them, at least not automatically (there might be some package or useflag that includes them). This makes it sound like it's only Debian/Ubuntu and openSUSE –  Michael Mrozek Aug 21 '10 at 17:43
    
CentOS 5.5 doesn't have them either, which probably also means RHEL 5 doesn't. I don't have easy access to any other distros though. –  Matt Aug 21 '10 at 19:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.