Running web2py on Hostgator Shared hosting!

1,589 views
Skip to first unread message

GoldenTiger

unread,
Dec 20, 2010, 8:56:52 AM12/20/10
to web2py-users
I think a lot of users will be happy of seeing this: web2py running
on hostgator.

Demo: http://hostgator.web2py.es (steps to install included)


There are a lot of people using Hostgator shared hosting, It is maybe
one of the best over the net, and their servers are very fast.
I've seen a lot of users trying to install web2py...if you do a Google
search, you'll can find that. A lot of users tried to install it (like
me) without success.

Some weeks ago I could successfully running web2py on hostgator shared
hosting.

Unlike Hostmonster or Dreamhost, on hostgator you can't compile custom
python version. But you can still run web2py.

STEPS for INSTALLING web2py on Hostgator :

1 - Via SSH shell, find python-2.7 using 'whereis' command:
* whereris python
* ................... something like 'usr/bin/python2.7'


2- Hostgator has following python 2.7 modules , and are currently
installed on almost all servers.
However, in my case, I had to create a ticket.
If you are missing any of these modules, open a LiveChat o create a
ticket:

* MySQL-python
* flup
* django
* psutil
* django-registration
* sorl-thumbnail
* south
* django-keyedcache
* django-livesettings
* django-app-plugins
* django-signals-ahoy
* pycrypto
* django-threaded-multihost
* PIL
* pyCrypto
* paramiko
* ElementTree
* cElementTree
* Pyrex
* hashlib
* Mercurial


3 - I unzipped web2py_src.zip into folder
'hostgator.web2py.es' ( web root folder)

wget http://www.web2py.com/examples/static/web2py_src.zip
unzip web2py_src.zip -d /home/goldentiger/public_html
mv web2py/* hostgator.web2py.es/


4 - I created 'dispatch.fcgi' starting with python2.7 path

#!/usr/bin/python2.7
import sys
from flup.server.fcgi_fork import WSGIServer
import gluon.main
application=gluon.main.wsgibase
## or
# application=gluon.main.wsgibase_with_logging
WSGIServer(application).run()

and set execution permission: chmod +x dispatch.fcgi

5- At last I created '.htaccess':
AddHandler fcgid-script .fcgi
Options +FollowSymLinks +ExecCGI
RewriteEngine On
RewriteBase /
RewriteRule ^dispatch\.fcgi/ - [L]
RewriteRule ^(.*)$ dispatch.fcgi/$1 [L]

mdipierro

unread,
Dec 20, 2010, 9:30:25 AM12/20/10
to web2py-users

Vasile Ermicioi

unread,
Feb 6, 2011, 4:17:15 PM2/6/11
to web...@googlegroups.com
5- At last I created '.htaccess':
AddHandler fcgid-script .fcgi
Options +FollowSymLinks  +ExecCGI
RewriteEngine On
RewriteBase /
RewriteRule ^dispatch\.fcgi/ - [L]
RewriteRule ^(.*)$ dispatch.fcgi/$1 [L]

what line should I add and where, or best of how will look entire htaccess file if I want apache to serve my static files

RewriteRule ^(.*)/static/(.*)$ applications/$1/static/$2




Massimo Di Pierro

unread,
Feb 6, 2011, 8:36:12 PM2/6/11
to web2py-users
says page not found. :-(
> wgethttp://www.web2py.com/examples/static/web2py_src.zip

GoldenTiger

unread,
Feb 6, 2011, 9:12:09 PM2/6/11
to web2py-users
LOL XD


- January, Last 30 days: --> From Analitycs : hostgator.web2py.es
===>>> 6 visits , 0:00:05 secs average time


- Yesterday: I removed the url for testing pourposes (temporarily)

- Today : This topic is resurrected


OK, I am going to fix it then :D

I'll write a web2pyslice, ok?

Franzé Jr

unread,
Feb 6, 2011, 9:31:57 PM2/6/11
to web...@googlegroups.com
I have a similar problem.

I'm using dreamhost.

I've used this : http://wiki.dreamhost.com/Web2py

But:

The requested URL /dispatch.fcgi/ was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


Some idea ?





--
Franzé Jr


GoldenTiger

unread,
Feb 6, 2011, 9:46:56 PM2/6/11
to web2py-users
I haven't any problem with hostgator, I renamed the dispatch.fcgi
intentionally

I also I have a Dreamhost VPS, and a shared plan. Web2py is working
OK using WSGI.

Why do you want fcgi?

GoldenTiger

unread,
Feb 7, 2011, 12:07:43 AM2/7/11
to web2py-users
I put Web2Py Demo running fast on Hostgator again at http://hostgator.web2py.es


You can try examples http://hostgator.web2py.es/examples

Kevin C

unread,
Oct 24, 2012, 10:39:18 AM10/24/12
to web...@googlegroups.com
Please see my post at https://groups.google.com/forum/#!searchin/web2py/hostgator/web2py/HvKqgkatK1E/0mFjGUYPjLYJ

I was able to successfully get web2py working on the baby plan at hostgator.  The key is in the permissions of your fcgi script and in setting the proper paths.

On Monday, October 22, 2012 8:47:02 PM UTC-5, Ariya Oaum-aram wrote:
Dear Golden tiger

Can I setup Web2py on hostgator share host (baby plan). I try to follow the step you guide, but it not work.

Thank you very much.



เมื่อ วันจันทร์ที่ 7 กุมภาพันธ์ ค.ศ. 2011, 12 นาฬิกา 7 นาที 43 วินาที UTC+7, GoldenTiger เขียนว่า:

GoldenTiger

unread,
Oct 28, 2012, 3:15:53 AM10/28/12
to web...@googlegroups.com
Yes, baby is ok

actually  hostgator uses python 2.7 by default , so now it is easier than 1 year ago
(if not 2.7, request by chat)


El martes, 23 de octubre de 2012 03:47:02 UTC+2, Ariya Oaum-aram escribió:
Dear Golden tiger

Can I setup Web2py on hostgator share host (baby plan). I try to follow the step you guide, but it not work.

Thank you very much.



เมื่อ วันจันทร์ที่ 7 กุมภาพันธ์ ค.ศ. 2011, 12 นาฬิกา 7 นาที 43 วินาที UTC+7, GoldenTiger เขียนว่า:
I put Web2Py Demo running fast on Hostgator again at http://hostgator.web2py.es
Reply all
Reply to author
Forward
0 new messages