- Plesk for Linux
- Plesk for Windows
How to check if Python script engine is enabled and working for a domain?
Note: Starting from Plesk 12.5 and higher, support for mod_python was dropped, see the following article for additional information:
Plesk no longer licenses ActivePython and ActivePerl from ActiveState. How to avoid violation of the license agreement?
Why mod_perl, mod_python, mod_php Apache modules are not installed by default starting from Plesk 12.5?
Create a test script to check it. For that:
- Log into Plesk
- Check that mod_python is enabled in Tools & Settings > Apache Web Server.
- Go to Domains > example.com > File Manager and create a sample
test.pyfile with the following content:
For Plesk 12.0 and lower on Linux OS:
CONFIG_TEXT: #!/usr/bin/env python
# -*- coding: UTF-8 -*-
# enable debugging
print "Content-Type: text/plain;charset=utf-8"
print "Hello World!"
For Plesk 12.5 and higher Windows:
CONFIG_TEXT: print('Content-Type: text/plain')
- Open https://example.com/test.py via any browser.
The test looks successful if a page shows the "Hello World!" string. If an error or full script listing is visible, it means that Python engine is not configured for the domain properly.