Welcome Guest. Please Login or Register  


You are here: Index > AMPPS > General Support > Topic : Python and mod wsgi



Normal Mode | Print  

Python and mod wsgi
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Hi,

1. Revert all the changes you have made in the conf files python.conf, httpd.conf etc.

2. Create a folder in Ampps in my case "myapp"

3. Create a .py file in it, in my case "wsgi.py" with the following contents:
Code

def application(environ, start_response):
    status = '200 OK'
    output = 'Hello World!'

    response_headers = [('Content-type', 'text/plain'),
                        ('Content-Length', str(len(output)))]
    start_response(status, response_headers)

    return [output]


4. Open Apache Configuration from AMPPS Application -> Apache Tab -> Configuration

5. Append the following lines in the end :
Code

WSGIScriptAlias /appname "D:\Program Files\Ampps\myapp\wsgi.py"
<Directory "D:\Program Files\Ampps\myapp">
    Order deny,allow
    Allow from all
</Directory>


6. Save the configuration file

7. Restart Apache

8. Access "http://localhost/appname" in my case, it should display "Hello World!".

Please open a ticket if you are facing any issues. We will look into it.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   


Threads
 muonshirata   Python and mod wsgi (1 Replies, Read 10206 times)
    |--  tidus   Hi, 1. Revert...   on September 28, 2013, 9:30 am

« Previous    Next »

Normal Mode | Print  



Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is May 10, 2025, 2:48 pm.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 10  |  Page Created In:0.110