I am getting "Invalid command 'WSGIScriptAlias' " error while starting Apache

The problem is that mod_wsgi is not installed properly.

Solution (using Apache 2):

  1. install Apache:

    $ sudo apt-get install apache2
    
  2. install libapache2-mod-wsgi:

    $ sudo apt-get install libapache2-mod-wsgi
    

And this should work fine.


The error specifically indicates that mod_wsgi is not being loaded into Apache.

In what file is:

LoadModule wsgi_module     libexec/httpd/mod_wsgi.so

Did you enable the mod_wsgi module with appropriate Linux distro management command so that it will be loaded if you used distro binary packages for mod_wsgi?