Django Apache Release

Source: Internet
Author: User

    1. Installing Httpd,django

      Yum install-y httpd Python-pip

      Pip Install Django (if the Python version is 2.6 requires PIP install django==1.4, if the Python version is 2.7, you can install the latest version of Django directly)

    2. Installing MOD_WSGI

      Yum Install-y Mod_wsgi

    3. Modify/etc/httpd/conf.d/wsgi.conf

LoadModule wsgi_module modules/mod_wsgi.soalias/templates//usr/local/django/admin/templates/(static file path) < Directory "/templates/" > Order deny,allow allow from all</directory>alias/static//usr/local/django/admin/st Atic/<directory "/static/" > Order deny,allow allow from All</directory>wsgipythonpath "/usr/local/dj Ango/admin "Wsgiscriptalias/"/usr/local/django/admin/admin/wsgi.py "

4. Restart httpd

Service httpd Restart

5. Check for static files

Python manage.py collectstatic (to execute this file in your project directory) PS: It seems like you want to copy the static files to the Python installation directory

6. You need to manually copy things under Templates to/usr/lib/python2.6/site-packages/django/contrib/admin/templates/and/usr/lib/python2.6/ In the site-packages/django/contrib/auth/templates/directory

PS: I don't know why I'm doing this.

Spit the slot: Django Default login is required to use the database, this does not know where to modify the database is not required.

This article is from "It worker-small Maple" blog, please be sure to keep this source http://wangfeng7399.blog.51cto.com/3518031/1684287

Django Apache Release

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.