Welcome Guest. Please Login or Register  

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

Normal Mode | Print  

 Python and WSGI: 50X error (0 Replies, Read 1385 times)
Group: Member
Post Group: Newbie
Posts: 1
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:

<VirtualHost *:80>
<Directory "{$path}/www">
    Options FollowSymLinks Indexes
    AllowOverride All
    Order deny,allow
    allow from All
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

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


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

3. I created a file myapp.wsgi containing

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
IP: --   

 cnaw   Python and WSGI: 50X error (0 Replies, Read 1385 times)

« Previous    Next »

Normal Mode | Print  

Users viewing this topic
1 guests, 0 users.

All times are GMT. The time now is November 30, 2020, 2:45 pm.

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