Some of the information here may be outdated, please check the book instead

Thank you Limodou for all your work on this

web2py supports windows service install/start/stop now in source version. If you want to use it, you should create an (for default usage) with startup parameters or specify an option file with -L <optionsfile> parameter in the command line.

The could be like this:

import socket, os
ip = socket.gethostname()
port = 80
password = '<recycle>' ### <recycle> means use the previous password
pid_filename = ''
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()

And you don't need to create manually, there is already an in web2py folder, so you can copy it and name it or just specify it in command line via -L parameter.

then run:

python2.5 -W install  #install web2py as a windows service
python2.5 -W start -L  #if you don't give -L parameter, the default configure file will be
python2.5 -W stop
© 2008-2010 by Massimo Di Pierro - All rights reserved - Powered by web2py - design derived from a theme by the earlybird
The content of this book is released under the Artistic License 2.0 - Modified content cannot be reproduced.