Apache2 modules folder where is it?

I actually used to install, manipulate and configure apache on windows and ultimately install and configure new modules to my local server, and the case isn't the same on Ubuntu.

I installed apache2, but I still can't find the modules folder, I mean the structure that I got on my computer isn't the same that I knew on windows!

  • the path is this : /etc/init.d/apache this path is the start|stop|restart|reload.
  • and the www directory is located here : /var/www/*.html

So, I am supposed to copy a module file that I got mod_security2.so to this location /usr/local/apache/modules/. In my case I don't have this structure for apache folders

$ ls /etc/apache2
apache2.conf envvars mods-enabled sites-enabled
conf-available magic ports.conf
conf-enabled mods-available sites-available

So where should I paste the module file knowing that the files inside mods-enabled are *.load and *.so.

1 Answer

Be prepared to ditch a lot of what you know from Windows. In particular, to install the security2 module, install libapache2-mod-security2:

sudo apt-get install libapache2-mod-security2

The module shared library files go in /usr/lib/apache2/modules, not that you should use your own when there's a packaged version available.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like