1, Mezzanine Introduction
Mezzanine is an application based on the Django framework, which can be consulted in detail on the official website: http://mezzanine.jupo.org/
2, Mezzanine Installation Guide:
# Install from PyPI $ pip Install Mezzanine # Create a project $ mezzanine-project myproject $ cd MYPROJEC T # Create a database $ python manage.py createdb # Run The Web server $ python manage.py runserver
New project If you want to modify the topic, refer to: Https://github.com/renyi/mezzanine-themes.git
3, modify the Nginx configuration file
Modify the configuration file nginx.conf in the Conf directory under your Nginx installation directory.
About deployment due to previous static file setup issues
CD /usr/local/nginx/conf/ gedit nginx.conf
Add the following content:
Be careful to modify the path of your corresponding project such as alias/home/daniel/myblog/static;
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; } }
As for the deployment method can be adopted, uwsgi,http://projects.unbit.it/downloads/.
Tar zxvf uwsgi-latest.tar.gz cd uwsgi-1.2.6 make cp uwsgi /usr/sbin/uwsgi
Install UWSGI.
Create a new file in your project directory django_wsgi.py
Add the following content:
#!/usr/bin/env python # coding:utf-8 import Os,sys if not os.path.dirname (__file__) in sys.path[:1]: Sys.path.insert (0, Os.path.dirname (__file__)) os.environ[' django_settings_module '] = ' SETTINGS ' from DJANGO.CORE.HANDLERS.WSGI Import wsgihandler application = Wsgihandler ()
New File Django.xml
Add the following, and note that you are modifying the path to yourself:
127.0.0.1:8000
true
/home/daniel/myblog
..
django_wsgi.py
true
Last run: Wsgi-x wsgi.xml
This is configured well, in the browser input: http://localhost:8080/
is not able to browse your site.
Specific configuration can be found in my project's related configuration
Https://github.com/ustcdane/Mezzanine-uwsgi-nginx
Article turned from: http://blog.csdn.net/daniel_ustc/article/details/8855303