Apache on Windows + many applications

27 views
Skip to first unread message

Dmitry Ermolaev

unread,
Jul 3, 2015, 5:37:51 AM7/3/15
to web...@googlegroups.com
I have Windows Server and Apache 2.2 and many apps:

 applications/app1
 applications/app2
 applications/app3

error if open domen url on seon app::
Traceback (most recent call last):
 
File "C:\web2py-m\gluon\main.py", line 436, in wsgibase
   
session.connect(request, response)
 
File "C:\web2py-m\gluon\globals.py", line 960, in connect
    session_pickled
= pickle.dumps(self, pickle.HIGHEST_PROTOCOL)
 
File "C:\web2py-m\gluon\storage.py", line 56, in <lambda>
   
__getnewargs__ = lambda self: getattr(dict,self).__getnewargs__(self)
TypeError: getattr(): attribute name must be string




in Apache config:
Include conf/includes/*.conf

############################################################  localhost:80  #######################################
<VirtualHost localhost:80>
# кто-то стучится черз локал хост на назные админи-урл! могут и на мой залезтьтак
#ServerName localhost
#ServerAlias localhost
DocumentRoot "C:/localhost"
<Directory "C:/localhost">
AllowOverride All
Order allow,deny
allow from all
</Directory>
<Location "/mySQLadmin">
Order deny,allow
Allow from all
</Location>

LogFormat "%h %l %u %t \"%r\" %>s %b" common
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" common
</VirtualHost>


in /includes I have web2py.conf:
<VirtualHost *:80>
  #ServerName lite.cash - not need
  #ServerAlias www.lite.cash - not need

    DocumentRoot  C:/web2py-m

#  <Directory C:/web2py-m>
#    Require all denied
#    <Files wsgihandler.py>
#      Require all granted
#    </Files>
#  </Directory>
#
#  <Directory c:/web2py-m/applications/*/static/>
#    Require all granted
#  </Directory>
#
#  <Location /admin>
#    Require all denied
#  </Location>
#
#  <LocationMatch ^/([^/]+)/appadmin>
#    Require all denied
#  </LocationMatch>
#################################################
<Directory "C:/web2py-m">
AllowOverride All
Order allow,deny
allow from all
</Directory>
<Location "/">
Order deny,allow
Allow from all
</Location>

<LocationMatch "^(/[\w_]*/static/.*)">
Order Allow,Deny
Allow from all
</LocationMatch>

WSGIScriptAlias  / "C:/web2py-m/wsgihandler.py"

LogFormat "%h %l %u %t \"%r\" %>s %b" common
ErrorLog "logs/lite.log"
CustomLog "logs/lite-access.log" common


</VirtualHost>

then in web2py root I have routes.py:
routes_app = [
# app3
    (r'.*?:https?://my_dom3.com/path3:\w* /$anything', r'app3'),
    (r'.*?:https?://www.my_dom3.com/path3:\w* /$anything', r'app3'),
# app2
    (r'.*?:https?://my_domain2:\w* /$anything', r'app2'),
    (r'.*?:https?://www.my_domain2:\w* /$anything', r'app2'),
# admin
    (r'(.+)admin/$anything', r'admin'),
# local
    (r'(.+)8000/(?P<any>.*)', r'\g<any>'),
# defaults
    ]



in each app folder I have routes.py
for example here two apps - bets as app4 and bs3b as app3
routes_in = (
(r'/bets/$anything', r'/bets/$anything'),
(r'/bets', r'/bets'),
(r'/', r'/bs3b/default/index/'),
(r'/index/$anything', r'/bs3b/default/index/$anything'),
(r'/index', r'/bs3b/default/index'),
#(r'/download', r'/bs3b/default/download'),
(r'/join/$anything', r'/bs3b/default/index/join/$anything'),
(r'/join', r'/bs3b/default/index/join'),
(r'/shop_add/$anything', r'/bs3b/default/shop_add/$anything'),
(r'/shop_add', r'/bs3b/default/shop_add'),
(r'/support/$anything', r'/bs3b/default/support/$anything'),
(r'/support', r'/bs3b/default/support'),
(r'/$anything', r'/bs3b/$anything'),
)

routes_out = [(x, y) for (y, x) in routes_in]



Dmitry Ermolaev

unread,
Jul 3, 2015, 7:44:10 AM7/3/15
to web...@googlegroups.com
https://7pay.in/ - worked

in rockets server all OK

in Apache - errors ((

pickle with Apache rise error

Niphlod

unread,
Jul 6, 2015, 6:47:17 AM7/6/15
to web...@googlegroups.com
BTW: why don't you just serve web2py behind iis ? No weird exceptions, easier to debug, better performances, lesser resources, etc etc. Come on, it's not 2001 anymore!
Reply all
Reply to author
Forward
0 new messages