This is how we do it:
Add to base config aka /etc/httpd/conf/httpd.conf the following in the appropriate section:
LoadModule wsgi_module modules/mod_wsgi.so
And in the appropriate section, add this too:NameVirtualHost *:80
#Add a VirtualHost Section for each Name-based virtual server
<VirtualHost>
ServerAdmin email@email.com
ServerName www.URL.com
ServerAlias URL.com *.URL.com
DocumentRoot /var/www/vhosts/URL/httpdocs
<Directory /var/www/vhosts/URL/httpdocs>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
then save the file and exit the editor.
In the directory of path '/var/www/vhosts/(DOMAIN NAME)/conf' there is a file called 'httpd.include.' It holds unique config info for each virtual domain. It is rebuilt automatically from time to time based on Plesk. Instead of editing that file, make a new one called 'vhost.conf' (if it doesn't already exist) and add the following info to this file:
WSGIDaemonProcess URL.com processes=1 threads=1 display-name=%{GROUP}
WSGIProcessGroup URL.com
WSGIScriptAlias /myapp /home/username/django/scripts/URL.com.wsgi
<Directory /home/username/django/scripts>
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/URL.com-error_log
CustomLog /var/log/URL.com-access_log common
Notes on the above, in brief- LoadModule is in httpd.conf
- NameVirtualHost declaration is in httpd.conf
- virtualhosts make use of /virtualhostname/conf/vhost.conf
- WSGIScriptAlias declarations are in respective vhost.conf, not in httpd.conf*
Once that is configured as you like, simply
/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=mt-example.com
service httpd graceful
Now test your django. With any luck, you will see a screen confirming a correct installation.