1, mezzanine介紹
mezzanine就是一個基於Django框架的應用,詳細可以參考官方網站:http://mezzanine.jupo.org/
2, Mezzanine 安裝指南:
# Install from PyPI $ pip install mezzanine # Create a project $ mezzanine-project myproject $ cd myproject # Create a database $ python manage.py createdb # Run the web server $ python manage.py runserver
如果要修改主題可以參考:https://github.com/renyi/mezzanine-themes.git3,修改nginx的設定檔 到你的nginx 安裝目錄下的conf目錄下修改設定檔. **** 關於部署由於先前靜態檔案的設定問題
cd /usr/local/nginx/conf/ gedit nginx.conf
server { listen 8080; server_name 123456; location / { root /home/daniel/myblog/; uwsgi_pass 127.0.0.1:8000; include uwsgi_params; } location /static { autoindex on; alias /home/daniel/myblog/static; access_log off; log_not_found off; } location /robots.txt { alias /home/daniel/myblog/static; access_log off; log_not_found off; } location /favicon.ico { alias /home/daniel/myblog/static/img; access_log off; log_not_found off; } }
tar zxvf uwsgi-latest.tar.gz cd uwsgi-1.2.6 make cp uwsgi /usr/sbin/uwsgi
ango.xml
運行: wsgi -x wsgi.xml這是設定好了,在瀏覽器輸入:http://localhost:8080/是不是能夠瀏覽你的網站了。 具體配置可參考我的工程裡的相關配置https://github.com/ustcdane/Mezzanine-uwsgi-nginx文章轉自blog.cso. article/details/8855303