After writing an article from connecting
Python to Lighttpd on Windows , I thought about using other scripting languages, for example, those already built into the system. In windows there is a so-called Windows Script Host, which standardly includes VBScript and JScript.
To do this,
install Lighttpd and add the following to the config (C: \ Program Files \ LightTPD \ conf \ lighttpd-inc.conf):
server.port = 81 server.modules = ( ... "mod_cgi", "mod_rewrite", ... ) server.document-root = "C:/Program Files/LightTPD/HTDOCS/" index-file.names = ( "index.wsh", ....) static-file.exclude-extensions = ( .... , ".wsh" ) cgi.assign = (".wsh" => "c:/windows/System32/cscript.exe" )
Start the server C: \ Program Files \ LightTPD \ TestMode.bat
Now you can write site scripts in JScript and VBScript without using third-party JavaScript interpreters.
')
For example, create two files in the C: \ Program Files \ LightTPD \ htdocs directory:
index.wsh with text
<?xml version="1.0" encoding="UTF-8"?> [ScriptFile] Path=index.js [Options] Timeout=0 DisplayLogo=0
and index.js with text
for(var i=0;i<100;i++) WScript.Echo(i.toString()+" Hello");
Following the
link http: // localhost: 81 / index.wsh
see a hundred lines of greeting.