Hi Lucas,
As a Web2py newbie I'm not sure that this is the (best) solution to your
problem, but I had a similar problem when I recently did a setup with
Web2py and Apache which I did not want to dedicate to the directory root of
the web server. Almost all the config comes from looking at this setup
script: http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh
I have attached my config but the part I specifically had to modify to get
it to work with login function was that I had to replace:
WSGIScriptAlias / /var/www/web2py/wsgihandler.py
with:
WSGIScriptAliasMatch ^/myapp.* /var/www/web2py/wsgihandler.py
WSGIScriptAliasMatch ^/admin.* /var/www/web2py/wsgihandler.py
Again, I'm not sure if this is a good solution, or if it will solve your
problem, but it worked for me :)
//Jon
Den lördagen den 11:e maj 2013 kl. 20:40:14 UTC+2 skrev lucas:
>
> i am having some difficulty setting up my apache httpd.conf file so that
> it redirects to the proper application within web2py for a dedicated
> domain. i have attached my default.conf which is located under
> /etc/httpd/conf.d on my centos 6.3 server. the last two virtual hosts were
> there all along and as long as i put in the root domain slash the
> application, "iquanta.info/weinstruct", it worked fine. then i added the
> first two virtual hosts recently so that the domain "weinstruct.org"
> would just redirect to "weinstruct.org/weinstruct". and it initially
> works until you login to the website through web2py's default/user/login,
> under the application. it excepts and leaves the following traceback. so
> since i ran for months ok, with only the default virtualhosts, and now that
> i added the redirecting virtualhosts, i am guessing there is something
> wrong with my setup of the apache virtualhosts. please give me advice.
> thank you in advance and i hope i explained this ok. lucas
>
> Traceback (most recent call last):
> File "/opt/web-apps/web2py/gluon/main.py", line 575, in wsgibase
> session._try_store_in_cookie_or_file(request, response)
> File "/opt/web-apps/web2py/gluon/globals.py", line 757, in
> _try_store_in_cookie_or_file
> self._try_store_in_file(request, response)
> File "/opt/web-apps/web2py/gluon/globals.py", line 763, in
> _try_store_in_file
> if not response.session_id or self._forget or self._unchanged():
> File "/opt/web-apps/web2py/gluon/globals.py", line 719, in _unchanged
> session_pickled = cPickle.dumps(dict(self))
> File "/usr/lib/python2.6/copy_reg.py", line 74, in _reduce_ex
> getstate = self.__getstate__
> File "/opt/web-apps/web2py/gluon/dal.py", line 7999, in __getattr__
> self.__allocate()
> File "/opt/web-apps/web2py/gluon/dal.py", line 7994, in __allocate
> "Using a recursive select but encountered a broken reference: %s
> %d"%(self._table, int(self)))
> RuntimeError: Using a recursive select but encountered a broken reference:
> auth_group 2
>
>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
WSGIDaemonProcess web2py user=www-data group=www-data
WSGIProcessGroup web2py
WSGIScriptAliasMatch ^/myapp.* /var/www/web2py/wsgihandler.py
WSGIScriptAliasMatch ^/admin.* /var/www/web2py/wsgihandler.py
WSGIPassAuthorization On
<Directory /var/www/web2py>
AllowOverride None
Order Allow,Deny
Deny from all
<Files wsgihandler.py>
Allow from all
</Files>
</Directory>
AliasMatch ^/([^/]+)/static/(.*) \
/var/www/web2py/applications/$1/static/$2
<Directory /var/www/web2py/applications/*/static/>
Options -Indexes
Order Allow,Deny
Allow from all
</Directory>
<Location /admin>
#Deny from all
Allow from TRUSTED.HOST.COM 127.0.0.1/8
</Location>
<LocationMatch ^/([^/]+)/appadmin>
#Deny from all
Allow from TRUSTED.HOST.COM 127.0.0.1/8
</LocationMatch>
<Directory /var/www/web2py/applications/*/static/>
Options -Indexes
ExpiresActive On
ExpiresDefault "access plus 1 hour"
Order Allow,Deny
Allow from all
</Directory>