Meena Vyas

All | DTrace Web Server 7.0 | ACLs Web Server 7.0 | General Web Server 7.0 | HttpCompression Web Server 7.0 | Intrusion Detection Web Server 7.0 | Open Web Server | Reference Deployments of Web Server 7.0 | Reverse Proxy Web Server 7.0 | Security Web Server 7.0 | Troubleshooting Web Server 7.0 | WebDAV Web Server 7.0
« Previous day (Aug 4, 2009) | Main | Next day (Aug 6, 2009) »
20090806 Thursday August 06, 2009

Python CGIs in Sun Web Server 7.0

Python CGIs in Sun Java System Web Server 7.0

Add this test script in <ws7-install-dir>https-<instance-name>/docs/cgi-bin directory and call it hello.cgi

#!/usr/bin/env python
print("Content-Type: text/plain;charset=utf-8")
print("\r\n")
print("Hello World!")

Change obj.conf default object 

<Object name="default">
AuthTrans fn="match-browser" browser="*MSIE*" ssl-unclean-shutdown="true"
NameTrans fn="ntrans-j2ee" name="j2ee"
NameTrans fn="pfx2dir" from="/cgi-bin" dir="/<ws-install-dir>/https-<instance-name>/docs/cgi-bin" name="cgi"
...
<Object name="cgi">
ObjectType fn="force-type" type="magnus-internal/cgi"
Service fn="send-cgi"
</Object>

Send a request through the browser http://host:post/cgi-bin/hello.cgi

You can see Hello World! displayed.

References

http://docs.python.org/3.1/howto/webservers.html

Posted by meena ( Aug 06 2009, 01:12:22 PM IST ) Permalink Comments [0]

This blog copyright 2009 by meena

Calendar

Search

RSS Feeds

Navigation

Referers