|
Original |
Translation |
|
1121
|
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\ScriptMap
|
|
|
1122
|
and enter the following line (making any specific changes that your system may need)::
|
|
|
1123
|
.py :REG_SZ: c:\<path to python>\python.exe -u %s %s
|
|
|
1124
|
This line will allow you to call your script with a simple reference like: ``http://yourserver/scripts/yourscript.py`` provided "scripts" is an "executable" directory for your server (which it usually is by default). The :option:`-u` flag specifies unbuffered and binary mode for stdin - needed when working with binary data.
|
|
|
1125
|
In addition, it is recommended that using ".py" may not be a good idea for the file extensions when used in this context (you might want to reserve ``*.py`` for support modules and use ``*.cgi`` or ``*.cgp`` for "main program" scripts).
|
|
|
1126
|
|
1127
|
http://www.e-coli.net/pyiis_server.html (for Win2k Server) http://www.e-coli.net/pyiis.html (for Win2k pro)
|
|
|
1128
|
Configuring Apache is much simpler. In the Apache configuration file ``httpd.conf``, add the following line at the end of the file::
|
|
|
1129
|
ScriptInterpreterSource Registry
|
|
|
1130
|
Then, give your Python CGI-scripts the extension .py and put them in the cgi-bin directory.
|
|