开发者

How to deploy web2py site on IIS7?

A couple question.

Running web2py on Windows Server 2008 R2, IIS7.5. Following the official online book I got the site working with 127.0.0.1:8000. But I want to add the website to IIS service so I can access it with subdomain.mydomain.com (got other sites running this way already)

    开发者_如何学Go
  1. IIS requires me to point to the root directory of the website. For web2py, which directory should I point it to?

  2. Any tutorial to create IIS 7.5 URL rewrite rule to use with web2py?

  3. The online book mentioned "options.py" but I don't seem to have that file anywhere in my web2py directory


  1. Point it to the folder that contains the file web2py.py.
  2. Web2py has a built-in URL routing capability that you should use in lieu of IIS 7.5 URL Rewrites
  3. If you read the page you referenced carefully, you'll notice that the file included with web2py is actually options_std.py. So you would need to copy the file and rename the copy options.py. From the web2py book:

You don't need to create "options.py" from scratch since there is already an "options_std.py" in the web2py folder that you can use as a model.

After creating "options.py" in the web2py installation folder, you can install web2py as a service with:

python web2py.py -W install 

and start/stop the service with:

python web2py.py -W start
python web2py.py -W stop

Finally, if you have more web2py specific questions you'll find a fantastic community and get great support at the official web2py google groups page.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜