How to configure root directory for WSGI scripts?

Created:

2016-12-26 06:21:43 UTC

Modified:

2017-08-08 13:23:01 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to configure root directory for WSGI scripts?

Applicable to:

  • Plesk Onyx for Linux

Question

How to configure domain root directory for WSGI scripts?

Answer

  1. Install mod_wsgi Apache module. For example:
    # yum install mod_wgci
  2. Under Domains > example.com > Apache & nginx Settings > Additional directives for HTTP specify the following:
    <IfModule wsgi_module>
    WSGIScriptAlias / /var/www/vhosts/example.com/httpdocs/wsgi_script.py
    </IfModule>

Note: path /var/www/vhosts/example.com/httpdocs/ may vary, depending on where the script is located.

Have more questions? Submit a request
Please sign in to leave a comment.