Which I effective followed save that I used different directory (/opt
instead of /local) and installed python 2.55 instead of virtualenv. I
don't think that is terribly import but I could be wrong.
Regardless, as far as I can tell I made it all the way through,
however when I go to the site I get:
An error occurred importing your passenger_wsgi.py
Unfortunately, I'm no expert on wsgi and the like so I'm at a loss at
what to do next to figure out the issue.
When I got down to
import gluon.main
I got:
WARNING:root:unable to import dbhash
issues???
My passenger_wsgi.py / wsgihandler.py code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This is a WSGI handler for Apache
Requires apache+mod_wsgi.
In httpd.conf put something like:
LoadModule wsgi_module modules/mod_wsgi.so
WSGIScriptAlias / /path/to/wsgihandler.py
"""
import sys
import os
INTERP = "/home/jesdavid/opt/bin/python2.5"
if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.arg)
sys.path.insert(0, '')
path = os.path.dirname(os.path.abspath(__file__))
if not path in sys.path:
sys.path.append(path)
os.chdir(path)
import gluon.main
from gluon.contrib.wsgihooks import ExecuteOnCompletion2, callback
application = ExecuteOnCompletion2(gluon.main.wsgibase, callback)
I have documented the steps here: http://www.web2pyslices.com/main/slices/take_slice/68
This is not the best/only way to do it, but I got it working (and in a
sub-directory/sub-url too).
-rppowell
Although, I'm sure it doesn't matter now when I ran "import dbhash" I
got a several line long error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/username/opt//lib/python2.5/dbhash.py", line 5, in
<module>
import bsddb
File "/home/username/opt//lib/python2.5/bsddb/__init__.py", line 51,
in <module>
import _bsddb
ImportError: No module named _bsddb
Another question: Any tips on getting into the Admin screens via
https? or at least without removing the security.
I'm guessing something like a self signed key will likely work, but
I'm unfamiliar.
I found:
http://web2py.com/AlterEgo/default/show/140
http://web2py.com/AlterEgo/default/show/143
I haven't tried either yet, but I hate running stuff without really
knowing what they're supposed to do since you can end up doing
unforeseen things.
As for I believe doing an SSH tunnel I don't entirely see how that
would let me log into the admin pages.
Any other ways?
On Mar 4, 12:45 pm, Jesse <joda...@gmail.com> wrote:
> Using virtualenv seemed to do the trick.
>
> Although, I'm sure it doesn't matter now when I ran "import dbhash" I
> got a several line long error:
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/home/username/opt//lib/python2.5/dbhash.py", line 5, in
> <module>
> import bsddb
> File "/home/username/opt//lib/python2.5/bsddb/__init__.py", line 51,
> in <module>
> import _bsddb
> ImportError: No module named _bsddb
>
> Another question: Any tips on getting into the Admin screens via
> https? or at least without removing the security.
> I'm guessing something like a self signed key will likely work, but
> I'm unfamiliar.
> I found:http://web2py.com/AlterEgo/default/show/140http://web2py.com/AlterEgo/default/show/143
Of course your best option is to use a ssh tunnel, forward the port 80
of the server to your local port 8080 or something, since admin allows
any localhost connections to access it will work.
-Thadeus
> --
> You received this message because you are subscribed to the Google Groups "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to web2py+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
>
>
I tried the ssh tunnel, but it didn't seem to have much effect:
ssh -L 80:web2py.mydomain.com:8080 lo...@dreamhost.com
ssh -L 8080:localhost:80 lo...@dreamhost.com
[and various other permutations]
I then tried going to localhost:8080 and got nada
Clearly my shellFu is not up to snuff but I would think one of my
guesses would have worked.
I guess I'll just cripple the security, since it's not exactly a big
deal if my testing site gets hacked anyway.
Jesse
On Mar 5, 12:19 am, Thadeus Burgess <thade...@thadeusb.com> wrote:
> When I ran web2py on dreamhost I just edited my admin application and
> removed the checks for https.
>
> Of course your best option is to use a ssh tunnel, forward the port 80
> of the server to your local port 8080 or something, since admin allows
> any localhost connections to access it will work.
>
> -Thadeus
>
> On Thu, Mar 4, 2010 at 10:01 PM, Jesse <joda...@gmail.com> wrote:
> > Looks like setting up self signed SSL on dreamhost requires a unique
> > IP (for extra $) which I'm not exactly up for just to learn web2py
> > (yes I know I can run it on my own computer).
>
> > As for I believe doing an SSH tunnel I don't entirely see how that
> > would let me log into the admin pages.
>
> > Any other ways?
>
> > On Mar 4, 12:45 pm, Jesse <joda...@gmail.com> wrote:
> >> Using virtualenv seemed to do the trick.
>
> >> Although, I'm sure it doesn't matter now when I ran "import dbhash" I
> >> got a several line long error:
> >> Traceback (most recent call last):
> >> File "<stdin>", line 1, in <module>
> >> File "/home/username/opt//lib/python2.5/dbhash.py", line 5, in
> >> <module>
> >> import bsddb
> >> File "/home/username/opt//lib/python2.5/bsddb/__init__.py", line 51,
> >> in <module>
> >> import _bsddb
> >> ImportError: No module named _bsddb
>
> >> Another question: Any tips on getting into the Admin screens via
> >> https? or at least without removing the security.
> >> I'm guessing something like a self signed key will likely work, but
> >> I'm unfamiliar.
> >> I found:http://web2py.com/AlterEgo/default/show/140http://web2py.com/AlterEgo...
for development I use two instances of web2py.
one:
python web2py.py -i public_ip -p 80 -a ""
two:
python web2py.py -i public_ip -p 8001 -a "password"
one instance serves my beta testers and users, the second on runs just for me
then I do:
ssh -L 8001:127.0.0.1:8001 kuba@server
and type 127.0.0.1:8001 in my browser. I promise you it will work.
the first "8001" is my local port on my desktop
the :127.0.0.1:8001 part is where I estabilished my web2py instance on
the server. that is all.
happy hacking.
--
Kuba
That seemed to do the tricked.
Dreamhost seems to be a bit touchy on which ports you I can use to run
web2py on. (ie none of 8000, 8001, 8080, 8081, etc seemed to work)
But I just picked a random number and it seems to work like a charm.
I'll have to add this to Dreamhost's wiki.
Thanks a bunch,
Jesse
http://wiki.dreamhost.com/Web2py
For anyone that is interested.
Also, I can migrate the info to another location if someone has a
suggestion as to where.
Cheers,
Jesse
Dreamhost IS shared hosting. An non standard ports are killed by
Dreamhost once they are spotted
> --
> You received this message because you are subscribed to the Google Groups "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to web2py+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
>
>
--
Frank Church
=======================
http://devblog.brahmancreations.com
should be:
python web2py.py -i 127.0.0.1 -p 8001 -a "password"
not:
python web2py.py -i public_ip -p 8001 -a "password"
here is a slice:
http://www.web2pyslices.com/main/slices/take_slice/71
--
Kuba
python web2py.py -i 0.0.0.0 -p 8001 -a "password"
for all public IPs
Result from using pretty much any of the above:
$ python web2py.py -i 0.0.0.0 -p 8001 -a "password"
The profile/pstats modules cannot be found
Please install the python-profiler package
web2py Enterprise Web Framework
Created by Massimo Di Pierro, Copyright 2007-2010
Version 1.76.3 (2010-03-03 16:58:56)
Database drivers available: SQLite3, MySQL
Starting cron...
please visit:
http://0.0.0.0:8001
use "kill -SIGTERM 14723" to shutdown the web2py server
Traceback (most recent call last):
File "web2py.py", line 20, in <module>
gluon.widget.start(cron=True)
File "/home/user/web2py.domain.com/gluon/widget.py", line 860, in
start
server.start()
File "gluon/main.py", line 773, in start
self.server.start()
File "gluon/wsgiserver.py", line 1879, in start
raise socket.error(msg)
socket.error: (98, 'Address already in use')