I'm using a custom app running web2py through uWSGI to serve my web site through the front-end shared nginx server for minimal RAM usage. I want to properly 301 from www.domain.com to domain.com for proper SEO practices. Is there a way to do this using the shared nginx instance or must I build and run my own web server for this kind of configuration? I'd really rather not run my own nginx server as it more than doubles my RAM usage. Using the front-end nginx instance with uWSGI leaves me much more RAM for uWSGI to work. asked 28 Dec '12, 15:24 HittingSmoke |
You have to build your own web-server which can make 301s, the front-end nginx server has zero configuration options. answered 28 Dec '12, 17:09 johns I was afraid of that. Well I set up a new static app to send all www.* domains to which has a universal mod_rewrite entry to 301 to a san-www URL. That will work for now I guess.
(28 Dec '12, 17:17)
HittingSmoke
That's actually the way we recommend you do it: Redirect a Domain with a Static/CGI/PHP App
(28 Dec '12, 17:44)
seanf
I am looking for a way to run web2py on webfaction either like you do (with the front-end nginx or just with uWSGI and its built in webserver. I found posts which advice to use the latter because the built in webserver of uWSGI is described as quite fast and should be flexible enough to do all the needing configurations. But as I am very new to all this stuff I haven't got the skills to set up these solutions. Could you be so kind to tell me how to configure your (the front-end nginx) way. Have you got a shell script for that? I am also very grateful for any hint how to get the pure uWSGI way running.
(29 Dec '12, 03:01)
xelomac
If you want to run web2py with uWSGI, a guide for installing uWSGI itself is available here. We don't have any guide for configuring web2py to use wsgi, but that should be available in the web2py documentation. If you are using web2py's internal webserver instead of using WSGI, then yes, you just need to use a Custom Application (listening on port), and then configure your web2py application to listen on Finally, yes we have an install script for web2py; it's available here. It's not an officially-supported application, though, so if you have trouble with the application you may want to look for help either on the community forums (here) or within the web2py community itself.
(29 Dec '12, 03:37)
ryans ♦♦
@ xelomac I have a script that I've been working on to install web2py using the most efficient memory methods possible that I hope to eventually turn into an xmlrpc deployment script. I'll put it in a new post when I'm finished as I'm not sure the comments section would handle a full script so gracefully. I'll reply here again once I post it to let you know.
(29 Dec '12, 14:37)
HittingSmoke
|