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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


NameVirtualHost *:80
NameVirtualHost *:443

<VirtualHost *:80>
  ServerName iquanta.org
  ServerAlias www.iquanta.org
  ServerAlias iquanta.info
  ServerAlias www.iquanta.info
  WSGIScriptAlias / /opt/web-apps/web2py/wsgihandler.py
  <Directory /opt/web-apps/web2py>
    RewriteEngine On
    #RewriteRule ^$ /iquanta
    RewriteRule ^(.*)/$ /iquanta
    #RewriteRule ^[\w/]iquanta*$ /iquanta/$1 #probably not correct
  </Directory>
</VirtualHost>

<VirtualHost *:80>
  ServerName weinstruct.org
  ServerAlias www.weinstruct.org
  WSGIScriptAlias / /opt/web-apps/web2py/wsgihandler.py
  <Directory /opt/web-apps/web2py>
    RewriteEngine On
    #RewriteRule ^$ /weinstruct
    RewriteRule ^(.*)/$ /weinstruct
    #RewriteRule ^[\w/]weinstruct*$ /weinstruct/$1 #probably not correct
  </Directory>
</VirtualHost>

<VirtualHost *:80>
  WSGIDaemonProcess web2py user=apache group=apache
  WSGIProcessGroup web2py
  WSGIScriptAlias / /opt/web-apps/web2py/wsgihandler.py
  WSGIApplicationGroup %{GLOBAL}

  <Directory /opt/web-apps/web2py>
    AllowOverride None
    Order Allow,Deny
    Deny from all
    <Files wsgihandler.py>
      Allow from all
    </Files>
  </Directory>

  AliasMatch ^/([^/]+)/static/(.*) 
/opt/web-apps/web2py/applications/$1/static/$2

  <Directory /opt/web-apps/web2py/applications/*/static>
    Options -Indexes
    Order Allow,Deny
    Allow from all
  </Directory>

  <Location /admin>
    Deny from all
  </Location>

  <LocationMatch ^/([^/]+)/appadmin>
    Deny from all
  </LocationMatch>

  CustomLog /var/log/httpd/access_log common
  ErrorLog /var/log/httpd/error_log
</VirtualHost>

<VirtualHost *:443>
  SSLEngine on
  SSLCertificateFile /etc/httpd/ssl/self_signed.cert
  SSLCertificateKeyFile /etc/httpd/ssl/self_signed.key

  WSGIProcessGroup web2py
  WSGIApplicationGroup %{GLOBAL}

  WSGIScriptAlias / /opt/web-apps/web2py/wsgihandler.py

  <Directory /opt/web-apps/web2py>
    AllowOverride None
    Order Allow,Deny
    Deny from all
    <Files wsgihandler.py>
      Allow from all
    </Files>
  </Directory>

  AliasMatch ^/([^/]+)/static/(.*) 
/opt/web-apps/web2py/applications/$1/static/$2

  <Directory /opt/web-apps/web2py/applications/*/static>
    Options -Indexes
    ExpiresActive On
    ExpiresDefault "access plus 1 hour"
    Order Allow,Deny
    Allow from all
  </Directory>

  CustomLog /var/log/httpd/access_log common
  ErrorLog /var/log/httpd/error_log
</VirtualHost>

Reply via email to