1
votes

I want to install mod_wsgi package which provides an Apache module that iimplements a WSGI compliant interface to host python-based applications on top of the Apache server. But for that apache should be installed on the ubuntu machine.

I am new to web hosting so I looked into all the details of how apache works.But then came the point of installing apache2 on ubuntu.There is no proper documentation of installing it so by reading from Ubuntu forums I installed by -

sudo apt-get install apache2

But the mod_wsgi official github page says this and it got me confused -

If running Linux, any corresponding developer variant of the specific Apache package you are using also needs to be installed. This is required in order to be able to compile mod_wsgi from source code.

For example, on Ubuntu Linux with Apache 2.2, if you were using the Apache prefork MPM you would need both:

apache2-mpm-prefork
apache2-prefork-dev

If instead you were using the Apache worker MPM, you would need both:

apache2-mpm-worker
apache2-threaded-dev

Now what sudo apt-get install apache2 installs then? And suppose if I want to use Apache worker MPM then how should I install the given two packages associated with it?

I am extremely new to the Apache world so I would really appreciate proper explanation with examples. Thanks

1

1 Answers

1
votes

Debian/Ubuntu has main packages just for the binary compiled versions of programs. In order to compile related software, you need also include (*.h) and other files, which are usually available in packages pkgname-dev. Similar you have various libraries installed in your system to be able to run programs using then. But in order to compile other program using this library, you need also the include files, usually in libXYZ-dev (but many times the package name is little different, for example libssl1.0.0 and libssl-dev).

This is all different from source packages, which contain the actual source codes used to compile the program itself. You usually don't need them.

Regarding apache: If you do apt-get install apache2, you will see which apache mpm (multi-processing module) it will install (worker, event, prefork, itk). Then install either apache2-prefork-dev or apache2-threaded-dev. If configuration / compilation of mod_wsgi will complain about some missing libraries, search for them on http://packages.ubuntu.com/ (search by package contents, so it will show you which package contain the file you need).