メザニンを試してみて、興奮しました。ubuntu サーバー + apache2 + mod_wsgi にデプロイします。しかし、画像を挿入できず、ブラウズ ウィンドウが表示されません。/gallery/ にアクセスしようとすると、常にエラーが発生します。私は新しくて必死です。親切に助けてください。
WSGI.PY
import os, sys, site
sys.stdout = sys.stderr
# Add the virtual Python environment site-packages directory to the path
ve_path = '/home/webapp/richardeng/lib/python2.7/site-packages'
site.addsitedir(ve_path)
# put the Django project on sys.path
sys.path.insert(0, ve_path)
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".")))
# Avoid ``[Errno 13] Permission denied: '/var/www/.python-eggs'`` messages
os.environ['PYTHON_EGG_CACHE'] = '/tmp'
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from django.core.handlers.wsgi import WSGIHandler
HTTPD.CONF
WSGIScriptAlias / /home/webapp/richardeng/project/wsgi.py
WSGIPythonPath /home/webapp/richardeng/lib/python2.7/site-packages
Alias /static/ /home/webapp/richardeng/project/static/
<Directory /home/webapp/richardeng/project/static>
Order deny,allow
Allow from all
</Directory>
<Directory /home/webapp/richardeng/project>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
以下の生地を使用しました。
FABRIC = {
"SSH_USER": "vagrant", # SSH username
"SSH_PASS": "vagrant", # SSH password (consider key-based authentication)
"SSH_KEY_PATH": "", # Local path to SSH key file, for key-based auth
"HOSTS": ["192.168.124.12", ], # List of hosts to deploy to
"VIRTUALENV_HOME": "/home/vagrant", # Absolute remote path for virtualenvs
"PROJECT_NAME": "mymezz", # Unique identifier for project
"REQUIREMENTS_PATH": "requirements/project.txt", # Path to pip requirements, relative to project
"GUNICORN_PORT": 8000, # Port gunicorn will listen on
"LOCALE": "en_US.UTF-8", # Should end with ".UTF-8"
"LIVE_HOSTNAME": "192.168.124.12", # Host for public site.
"REPO_URL": "git://github.com/nimbis/mezzanine-project.git", # Git or Mercurial remote repo URL for the project
"DB_PASS": "password", # Live database password
"ADMIN_PASS": "default", # Live admin user password
}
私の失敗したテスト Web: http://www.globalunicom.com admin/@richard
サーバーにメザニンを直接インストールしてみました。apache2 サーバーと mysql を実行します。httpd.conf と wsgi.py は同じままです。残念ながら、/gallery と admin で画像をアップロードすることはできません。今回だけ、以下のような別の問題が発生しました。サムネ1枚じゃ使えないみたい
私はこの分野に不慣れです。そして、あなたが貢献してくれたすべての努力に感謝します。どうもありがとうございます!私は次の一歩を踏み出せることを願っています. 前もって感謝します。
Firefox ブラウザ FileSystemEncodingChanged at /gallery/
パスに Unicode 文字を含むファイルにアクセスしようとしましたが、現在のロケールでは utf-8 がサポートされていません。「LC_ALL」を正しい値に設定する必要がある場合があります (例:「en_US.UTF-8」)。
リクエスト方法: GET リクエスト URL: http://www.globalunicom.com/gallery/ Django バージョン: 1.4.1 例外タイプ: FileSystemEncodingChanged 例外値:
パスに Unicode 文字を含むファイルにアクセスしようとしましたが、現在のロケールでは utf-8 がサポートされていません。「LC_ALL」を正しい値に設定する必要がある場合があります (例:「en_US.UTF-8」)。
例外の場所: /home/webapp/test5/lib/python2.7/site-packages/mezzanine/core/templatetags/mezzanine_tags.py サムネイルの 244 行目 Python 実行可能ファイル: /usr/bin/python Python バージョン: 2.7.3 Python道:
['/home/webapp/test5/test5', '/home/webapp/test5', '/home/webapp/test5/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg' , '/home/webapp/test5/lib/python2.7/site-packages/pip-1.1-py2.7.egg', '/home/webapp/test5/lib/python2.7/site-packages', ' /usr/local/lib/python2.7/dist-packages/pip-1.1-py2.7.egg'、'/usr/lib/python2.7'、'/usr/lib/python2.7/plat-linux2 '、'/usr/lib/python2.7/lib-tk'、'/usr/lib/python2.7/lib-old'、'/usr/lib/python2.7/lib-dynload'、'/usr /local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/pymodules/python2.7']
サーバー時間: 2012 年 8 月 12 日 (日) 23:33:21 +0800