Hi all,
I've tried a few different things to try to fix this but I can't seem to
figure out what I am doing wrong. I can't seem to resolve the "ImportError:
No module named site" error that I keep seeing in the Apache error_log.
I've gone thru a few Django + apache guides, but nothing seems to be
resolving this.
I clearly see site.py in the virtual environment's
/foodir/data/www/newrb/venv/lib/python2.7
directory. The end results are RB showing the 500 error page.
Below are the two files - any help or pointers are appreciated.
reviewboard.wsgi
python_home = '/foodir/data/www/newrb/venv'
activate_this = python_home + '/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))
import os
import sys
# Add site-packages of virtual env to use
#site.addsitedir('/foodir/data/www/newrb/venv/lib/python2.7/site-packages')
#sys.path.insert(0,'/foodir/data/www/newrb/venv/lib/python2.7/site-packages')
# Add app's directory to pythonpath
#sys.path.append('/foodir/data/www/rbdev')
#sys.path.append('/foodir/data/www/rbdev/htdocs')
#sys.path.append('/foodir/data/www/rbdev/conf')
#sys.stderr.write('\n'.join(sys.path))
import __main__
__main__.__requires__ = ['ReviewBoard']
import pkg_resources
os.environ['DJANGO_SETTINGS_MODULE'] = "reviewboard.settings"
os.environ['PYTHON_EGG_CACHE'] = "/foodir/data/www/rbdev/tmp/egg_cache"
os.environ['HOME'] = "/foodir/data/www/rbdev/data"
# Pythonpath is NULL before this.
os.environ['PYTHONPATH'] =
'/foodir/data/www/rbdev/conf:/foodir/data/www/newrb/venv/lib/python2.7/site-packages'
+ os.environ.get('PYTHONPATH', '')
#sys.path = ['/foodir/data/www/rbdev/conf'] + sys.path
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
apache-wsgi.conf
#WSGIPythonHome /foodir/data/www/newrb/venv
#WSGIPythonPath /foodir/data/www/rbdev/conf
<VirtualHost *:443>
ServerName rbdev
DocumentRoot "/foodir/data/www/rbdev/htdocs"
SSLEngine on
SSLCertificateFile /foodir/etc/ssl/rbdev.crt
SSLCertificateKeyFile /foodir/etc/ssl/rbdev.key
SetEnv HTTPS on
# Error handlers
ErrorDocument 500 /errordocs/500.html
ErrorLog logs/rbdev.ssl_error_log
TransferLog logs/rbdev.ssl_access_log
LogLevel warn
WSGIDaemonProcess reviewboard python-home=/foodir/data/www/newrb/venv
python-path=/foodir/data/www/newrb/venv/lib/python2.7/site-packages:/foodir/data/www/rbdev/conf
WSGIProcessGroup reviewboard
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
WSGIScriptAlias "/" "/foodir/data/www/rbdev/htdocs/reviewboard.py"
process-group=reviewboard
<Directory "/foodir/data/www/rbdev/htdocs">
AllowOverride All
Options -Indexes +FollowSymLinks
Require all granted
</Directory>
# Prevent the server from processing or allowing the rendering of
# certain file types.
<Location "/media/uploaded">
SetHandler None
Options None
AddType text/plain .html .htm .shtml .php .php3 .php4 .php5 .phps .asp
AddType text/plain .pl .py .fcgi .cgi .phtml .phtm .pht .jsp .sh .rb
<IfModule mod_php5.c>
php_flag engine off
</IfModule>
# Force all uploaded media files to download.
<IfModule mod_headers.c>
Header set Content-Disposition "attachment"
</IfModule>
</Location>
# Alias static media requests to filesystem
Alias /media "/foodir/data/www/rbdev/htdocs/media"
Alias /static "/foodir/data/www/rbdev/htdocs/static"
Alias /errordocs "/foodir/data/www/rbdev/htdocs/errordocs"
Alias /favicon.ico
"/foodir/data/www/rbdev/htdocs/static/rb/images/favicon.png"
</VirtualHost>
--
Supercharge your Review Board with Power Pack:
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons:
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups
"Review Board Community" 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/d/optout.