Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ----from windows httpd.conf ---
- WSGIScriptAlias /moin2/ /home/web/m2-fixedleft/moin2.wsgi/
- <Directory "C:/home/web/m2-fixedleft/">
- Options None
- AllowOverride None
- Order allow,deny
- Allow from all
- ExpiresActive On
- ExpiresDefault "access plus 3600 seconds"
- </Directory>
- ----my wsgi file used for both windows and centos ----
- # -*- coding: iso-8859-1 -*-
- """
- MoinMoin - mod_wsgi driver script
- To use this, add those statements to your Apache's VirtualHost definition:
- # you will invoke your moin wiki at the root url, like http://servername/ItemName:
- WSGIScriptAlias / /some/path/moin.wsgi
- # create some wsgi daemons - use someuser.somegroup same as your data_dir:
- WSGIDaemonProcess moin-wsgi user=someuser group=somegroup processes=5 threads=10 maximum-requests=1000 umask=0007
- # use the daemons we defined above to process requests!
- WSGIProcessGroup moin-wsgi
- @copyright: 2010 by MoinMoin:ThomasWaldmann
- @license: GNU GPL, see COPYING for details.
- """
- # hint: use None as value if the code already is in sys.path
- # moin_code = None # '/path/to/code'
- # wiki_config = '/path/to/config/wikiconfig.py'
- import sys, os, site
- # print '==moin2.wsgi==', sys.path
- # per http://code.google.com/p/modwsgi/wiki/VirtualEnvironments
- if sys.platform == 'win32':
- site.addsitedir('/home/web/m2-fixedleft-venv-python/Lib/site-packages')
- # site.addsitedir('/python26/Lib/site-packages')
- # activate_this = '/home/web/m2-fixedleft/env/Scripts/activate_this.py'
- else:
- site.addsitedir('/home/rockart/webapps/web/m2-fixedleft-venv-python/lib/python2.7/site-packages')
- # activate_this = '/home/rockart/webapps/web/moin-2.0/env/bin/activate_this.py'
- # execfile(activate_this, dict(__file__=activate_this))
- print '= moin2.wsgi sys.path =\n',
- for p in sys.path:
- print p
- print '== end sys.path ==\n'
- #~ wiki_config = os.path.dirname(os.path.abspath(__file__)) + '/wikiconfig.py'
- wiki_config = os.path.dirname(os.path.abspath(__file__)) + '/wikiconfig_local.py'
- moin_code = os.path.dirname(os.path.abspath(__file__))
- if moin_code:
- # add the parent dir of the MoinMoin code to sys.path,
- # to make import work:
- sys.path.insert(0, moin_code)
- # application is the Flask application
- from MoinMoin.app import create_app
- application = create_app(wiki_config)
- # please note: if you want to do some wsgi app wrapping, do it like shown below:
- #application.wsgi_app = somewrapper(application.wsgi_app)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement