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

15,467

Solution 1

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

Solution 2

Though you are on Ubuntu.

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

rpm -q mod_wsgi

Solution 3

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

Solution 4

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

Share:
15,467
Deepend
Author by

Deepend

Beginner programmer

Updated on June 11, 2022

Comments

  • Deepend
    Deepend about 2 years

    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.

  • Deepend
    Deepend about 10 years
    Thanks man. great tip. At least I now know where it should appear when I have it installed.
  • alhelal
    alhelal almost 4 years
    this result mod_wsgi-3.4-12.amzn2.0.2.x86_64 in my amazon ec2 linux 2 instance. But browser shows 403 forbidden error
  • sutan
    sutan almost 2 years
    if mods-enabled exists, does this means mod_wsgi is installed? or the directory exists nevertheless?