The next day Django Apache

Source: Internet
Author: User

1.

475 Brew Tap Homebrew/apache

476 Brew Install Mod_wsgi

477 ls/usr/local/cellar/mod_wsgi/4.5.7/libexec/mod_wsgi.so

478 sudo vi/etc/apache2/httpd.conf

2.

wsgi.py

Import Sys
Sys.path.append ('/library/webserver/documents/blog ')

setting.py

Installed_apps = [
' Django.contrib.admin ',
' Django.contrib.auth ',
' Django.contrib.contenttypes ',
' Django.contrib.sessions ',
' Django.contrib.messages ',
' Django.contrib.staticfiles ',
' Django.contrib.sites ',
' Django.contrib.flatpages ',
' Django.contrib.sitemaps ',
' Django_comments ',
' Rest_framework ',
' Corsheaders ',
' Snippets ',
' Blogpost ',
' Blog '
]

3.

httpd.conf

Wsgiscriptalias//library/webserver/documents/blog/blog/wsgi.py

Wsgipythonpath/library/webserver/documents

<Directory/Library/WebServer/Documents/blog>

<files wsgi.py>

Order Deny,allow

Allow from all

</Files>

</Directory>

alias/static//library/webserver/documents/blog/static/

<Directory/Library/WebServer/Documents/blog/static>

Allow from all

</Directory>

DocumentRoot "/library/webserver/documents"

<directory "/library/webserver/documents" >

wsgiscriptalias/blog/library/webserver/documents/blog/blog/wsgi.py

http://blog.csdn.net/cocowuyung/article/details/51045703

http://blog.csdn.net/makingmaker/article/details/28600325

The next day Django Apache

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.