Welcome Guest. Please Login or Register  


You are here: Index > AMPPS > General Support > Topic : Python and WSGI: 50X error



Threaded Mode | Print  

 Python and WSGI: 50X error (0 Replies, Read 881 times)
cnaw
Group: Member
Post Group: Newbie
Posts: 1
Status:
Dear all,

I read a couple of posts regarding running python scripts on AMPPS 3.7 (Windows 10). I made some adjustments in httpd.conf but still receive the error message when calling localhost/myapp:

A 50X error occurred
Sorry, the page you are looking for is currently unavailable.
Please try again later.


What I did so far:

1. I adjusted httpd.conf Virtualhost as follows:

Code
<VirtualHost *:80>
<Directory "{$path}/www">
    Options FollowSymLinks Indexes
    AllowOverride All
    Order deny,allow
    allow from All
</Directory>
ServerName localhost
ServerAlias localhost *
ScriptAlias /cgi-bin/ "{$path}/www/cgi-bin"
DocumentRoot "{$path}/www"
ErrorLog "{$path}/apache/logs/error.log"
CustomLog "{$path}/apache/logs/access.log" combined

<Directory "{$path}/www/wsgi-scripts">
    Order allow,deny
    Allow from all
</Directory>

WSGIScriptAlias /myapp "{$path}/www/wsgi-scripts/myapp.wsgi"

</VirtualHost>


2. I created a folder wsgi-scripts \Ampps\www\wsgi-scripts

3. I created a file myapp.wsgi containing

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]


Did I miss any steps?

I really appreciate your support and advise. Let me know if you need further information.

Kind regards
Clemens
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is February 25, 2018, 3:56 pm.

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