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
IIS requires me to point to the root directory of the website. For web2py, which directory should I point it to?
Any tutorial to create IIS 7.5 URL rewrite rule to use with web2py?
The online book mentioned "options.py" but I don't seem to have that file anywhere in my web2py directory
- Point it to the folder that contains the file
web2py.py
. - Web2py has a built-in URL routing capability that you should use in lieu of IIS 7.5 URL Rewrites
- 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 copyoptions.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.
精彩评论