0% found this document useful (0 votes)
58 views

Cookbook For How I Installed A

This document provides instructions for installing web2py as a console-less and window-less service on Windows Server 2003. It involves 4 steps: 1) Configuring options.py, 2) Registering web2py as a service, 3) Modifying the registry to point to SRVANY.exe and specify configuration parameters, 4) Starting the service with a user account that has networking privileges. Once started, the web2py application can be accessed via URL without any visible console or window.

Uploaded by

toan75
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views

Cookbook For How I Installed A

This document provides instructions for installing web2py as a console-less and window-less service on Windows Server 2003. It involves 4 steps: 1) Configuring options.py, 2) Registering web2py as a service, 3) Modifying the registry to point to SRVANY.exe and specify configuration parameters, 4) Starting the service with a user account that has networking privileges. Once started, the web2py application can be accessed via URL without any visible console or window.

Uploaded by

toan75
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

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).
1. 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()
2. Step Two, register web2py as a service:
From a cmd window type:
instsrv web2py "C:\Program Files\Windows Resource Kits\Tools\srvany.exe"
3. 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 #>
4. 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.

You might also like