zoukankan      html  css  js  c++  java
  • 第二天 django apache

    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

    http://www.dannysite.com/blog/236/

    http://www.jianshu.com/p/3bf9fb2a7e31

  • 相关阅读:
    (QR14)带权的DAG节点排序
    数字组合
    最长连续不重复子序列
    树状数组
    归并排序
    差分
    前缀和
    64位整数乘法
    MySQL8 常用指令
    离线及实时实操架构
  • 原文地址:https://www.cnblogs.com/javastart/p/5927541.html
Copyright © 2011-2022 走看看