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
|