- Plesk 11.x for Linux
- Plesk 12.0 for Linux
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: How to install Perl/Python on Plesk 12.5, Onyx and newer? This article is applicable for Plesk 12.0 and lower.
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:
MYSQL_LIN: #!/usr/bin/env python
# -*- coding: UTF-8 -*-
# enable debugging
print "Content-Type: text/plain;charset=utf-8"
print "Hello World!"
- 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.