I'm using Apache 2.4.6.

Apache:
$ tail /etc/apache2/apache2.conf
ScriptAlias /python/ /var/www/python/
<Directory "/var/www/python">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all
    AddHandler cgi-script .py
    AddHandler default-handler .html .htm
</Directory>

CGI script:
$ ls -ld /var/www/python
drwxr-xr-x 2 root root 4096 May 17 17:30 /var/www/python/
$ ls -ld /var/www/python/my_script.py
-rwxr-xr-x 1 root root 106 May 17 17:29 /var/www/python/my_script.py

Yet, when I do:
$ curl http://localhost/python/my_script.py

I get:
#!/opt/python/bin/python
print("Content-Type: text/html")
print()
print ("""<H1>Hello, world!</H1>""")

instead of my desired HTML output.

Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to