RyaneD <scadzomb...@...> writes:
Hi Ryan,
I had similar issues with deployment of Web2py and I've been through all
these solutions. I have however successfully deployed web2py on a shared host
(Albeit I will agree that it isn't the most ideal way to deploy). This is my
current method of deployment. Maybe I'll create a slice for such deployments.
METHOD 2 - Deploying Web2py the simplest way on a shared host
The simplest way to deploy web2py on a shared host is to run web2py using the
below command. You can specify a port of your choice.
Steps:
1. Install virtual environment on the sahred host
2. Install python and other required modues 2.6 release is good currently
3. Install web2py (simply unzip in a folder of your choice)
4. Run web2py with the below nohup command.
Command:
nohup python web2py.py –a ‘<recycle>’ –i <your site IP> –p <different port that
8080 for example say 9070> &
5. The .htaccess file in your server should redirect to this url when you
hit
for example www.abc.com in a browser url box.
.htaccess file (for me it resides in public_html folder )
Redirect permanent <url path to redirect to> Example :
Redirect permanent / http://www.abc.com:9080/MyProject/default/index
Although this is not a great idea to deploy web2py as we have specified ports
for it in url. However we can conceal this using or configuring routes. This is
a minimal setup requirement to run a web2py site or application on a shared host
without going through Apache or other servers interiors.
Please keep in mind that this deployment will be using web2py’s internal rocket
server to deliver requests. This is a great server but may be not for everyone’s
tastes. But it does the trick.
Also you may need to check your websites availability everyday. If the site
appears down. Just login to console and again issue the nohup command and it
should do the trick. Do let me know if that works for you. Thanks
Its always a thrill to view ones work or project in action.
Cheers and Great Day
Rahul :)
PS: Also note you dont have to play with routes etc for this deployment. The
defaults (unmodified) what come with web2py would be fine.