As promised:

Cookbook for how I installed a console-less-and-DOS-black-window-less
web2py service on a Windoze Server 2003, Standard Edition - Build 3790
(Service Pack 2).


Step One, change C:\web2py\options.py to:

import socket, os
ip = socket.gethostname()
port = 8000
password = '<recycle>' ### <recycle> means use the previous password
pid_filename = 'httpserver.pid'
log_filename = 'httpserver.log'
ssl_certificate = '' ### path to certificate file
ssl_private_key = '' ### path to private key file
numthreads = 10
server_name = socket.gethostname()
request_queue_size = 5
timeout = 10
shutdown_timeout = 5
folder = os.getcwd()

Step Two, register web2py as a service:

>From a cmd window type:
instsrv web2py "C:\Program Files\Windows Resource Kits\Tools
\srvany.exe"


Step Three, modify the registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\web2py. Modify
the "ImagePath" string value to be the location of SRVANY.exe. Make a
copy of "c:\Program Files\Windows Resrouce Kits\Tools\srvany.exe" to
"c:\web2py\srvany.exe" and point the ImagePath to it.


Next, add to the registry, under the HKEY_LOCAL_MACHINE\SYSTEM\...
\web2py (as per above), a "Parameters" key (HKEY_LOCAL_MACHINE\SYSTEM
\CurrentControlSet\Services\web2py\Parameters), and three string
values, AppDirectory, Application, and AppParameters. AppDirectory is
the root directory of the service, in this case, C:\web2py.

Application is the c:\web2py\web2py.exe.

AppParameters is the value of the parameters passed into our
executable: -a <password> -i <ip.address> -p <port #>


Step Four, start the service with a user account that has networking
privileges. In my case, I used the Administrator account.


At this point, I started the service, and accessed the URL to web2py
via a web browser. No console application or DOS window is visible on
the desktop.


The End

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to