views:

14

answers:

0

I have a WSGI app configured to run from the root of my site. This means that any url under this domain will execute the app. I am trying run a separate python script from within the main WSGI app. I am having a difficult time understanding how to configure my app to execute another local script. The second script needs to receive a POST request and return a value to the main WSGI app. Thanks.

<VirtualHost *:80>
  ServerName www.example.com
  ServerAlias example.com
  ServerAdmin [email protected]

  DocumentRoot /usr/local/www/documents

  Alias /documents/ /usr/local/www/documents/

<Directory /usr/local/www/documents>
  Order allow,deny
  Allow from all
</Directory>

WSGIDaemonProcess example.com processes=2 threads=15
WSGIProcessGroup example.com

WSGIScriptAlias /test /usr/local/www/documents/secondscript.wsgi
WSGIScriptAlias / /usr/local/www/wsgi-scripts/myapp.wsgi

<Directory /usr/local/www/wsgi-scripts>
  Order allow,deny
  Allow from all
</Directory>

<Directory />
  Options FollowSymLinks
  AllowOverride None
</Directory>

<Directory /var/www/>
  Options Indexes FollowSymLinks MultiViews
  AllowOverride None
  Order allow,deny
  allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

<Directory "/usr/lib/cgi-bin">
  AllowOverride None
  Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
  Order allow,deny
  Allow from all
</Directory>

ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

</VirtualHost>