My Ampps Installation folder
D:\Program Files\Ampps
my httpd.conf
pastebin.com/T3uQfuT6
my python.conf
Code
LoadModule wsgi_module modules/mod_wsgi.so
DirectoryIndex index.wsgi default.wsgi index.py default.py
WSGIPythonPath "D:/Program Files/Ampps/python/Lib;D:/Program Files/Ampps/python/Lib/site-packages;D:/Program Files/Ampps/python/DLLs"
WSGIPythonHome "D:/Program Files/Ampps/python"
<VirtualHost *:80>
ServerName localhost
ServerAlias 127.0.0.1
ServerAdmin webmaster@example.com
DocumentRoot "D:\Program Files\Ampps\www\wsgi-scripts"
WSGIScriptAlias /myapp "D:\Program Files\Ampps\www\wsgi-scripts\myapp.wsgi"
</VirtualHost>
myapp.wsgi
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]
D:\Program Files\Ampps\www\wsgi-scripts\test.py
Code
print "Content-type: text/html"
print
print "<html>"
print "<head>"
print "<title>Test CGI</title>"
print "</head>"
print "<body>"
print "<h1>test!</h1>"
print "<p>By a Peaceful dark pond</p>"
print "<p>A frog plops</p>"
print "<p>Into the still water</p>"
print "</body>"
print "</html>"
output test.py
403 Forbidden
You don't have permission to access /wsgi-scripts/test.py on this server.
because i add handler .py to my http.conf
if i delete .py handler i get py code output.
i have read https://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide
i allready do that right click ampps tray icon ->configuration->ampps->python enviroment checked
but i'm still confuse. pleas help. thx.
|