How to check if mod_wsgi is installed on a shared Apache server?
Asked Answered
S

4

13

I am looking into deploying a Django project on a shared server running Apache. This is my first time doing this. I have a shared folder on the server for my work and I have been added to the sudo group so I can install new software.

How do I check via Terminal command line if mod_wsgi is already installed? and preferably what version it is?

I can ssh onto the server, the version of Apache is

$ apache2 -v
Server version: Apache/2.2.22 (Ubuntu)
Server built:   Jul 12 2013 13:37:10
$ 

Any help is much appreciated.

EDIT:

Just for future reference, after I ran the command $ dpkg -s libapache2-mod-wsgi provided by Dirk Eschler it showed me that it was not installed. It returned

Package `libapache2-mod-wsgi' is not installed and no info is available.
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.

Hope this helps someone else.

Spigot answered 27/5, 2014 at 13:15 Comment(0)
L
17

To check if it is installed:

$ dpkg -s libapache2-mod-wsgi

In case it is installed, you might check if it's loaded by Apache:

$ apache2ctl -t -D DUMP_MODULES
Luthuli answered 27/5, 2014 at 13:38 Comment(0)
S
12

Though you are on Ubuntu.

This might help someone else on CentOS, Fedora or Red Hat

rpm -q mod_wsgi
Scratch answered 29/7, 2017 at 23:21 Comment(1)
this result mod_wsgi-3.4-12.amzn2.0.2.x86_64 in my amazon ec2 linux 2 instance. But browser shows 403 forbidden errorWaters
S
7

Since you're on Ubuntu, which is Debian-based, you can look in /etc/apache2/mods-enabled.

Strickler answered 27/5, 2014 at 13:42 Comment(2)
Thanks man. great tip. At least I now know where it should appear when I have it installed.Spigot
if mods-enabled exists, does this means mod_wsgi is installed? or the directory exists nevertheless?Germanize
H
1

if you working with python in Red Hat search this for mod_wsgi installed or not yum search python3-mod_wsgi

or search this for module is loaded or not rpm -q python3-mod_wsgi

Read More about python

Heliotrope answered 1/10, 2021 at 14:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.