Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've installed mod_wsgi on my Plesk server, but I can't get it to behave the way I'd like. If I add

WSGIScriptAlias /python /var/www/vhosts/

To my config file, going to triggers my test.wsgi script. However, going to any domain on my server and adding /python triggers my script as well. How can I limit it to one specific domain without breaking anything in Plesk?

Right now I've tried this and it doesn't work

<Directory /var/www/vhosts/>
        WSGIApplicationGroup %{GLOBAL}
        AddHandler wsgi-script .wsgi
        Options ExecCGI
        Order allow,deny
        Allow from all
share|improve this question

closed as off-topic by Katherine Villyard, masegaloeh, 84104, Ward, Scott Pack Apr 17 '15 at 3:03

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

Questions involving web hosting control panels are off-topic at Server Fault because they customize their systems beyond our ability to support, and thus require support from the vendor or the web hosting industry. See Where can I ask questions about web hosting control panels? – Katherine Villyard Apr 16 '15 at 21:33
@KatherineVillyard Not entirely sure why you commented on a 3 year old question, but I know that this question is off-topic now. What a blast of nostalgia, I've come along way since this question :) – Brandon Wamboldt Apr 17 '15 at 0:45
Hi, Brandon! We're on a big web hosting control panel purge, and your question came up in a search. It was probably on topic in 2012 when you asked it, so no offense meant. :) – Katherine Villyard Apr 17 '15 at 0:49

The WSGIScriptAlias needs to be specified inside of the VirtualHost for site you want it defined in. You must have it outside, or you are not using conventional virtual host mechanisms.

share|improve this answer
up vote 0 down vote accepted

Turns out I was pretty close to an answer. I changed my config to this:

<Directory /var/www/vhosts/>
        AddHandler wsgi-script .wsgi 
        Options +ExecCGI

Which now lets me run .wsgi files in any directory I want. I can combine that with .htaccess files to get roughly the same behaviour as I had with PHP

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.