apache服務器運行django程序virtualhost配置的典型代碼

WSGIPythonHome "/var/www/html/django/.py3env"

Listen 8080
<VirtualHost *:8080>

ServerName django.example.com

Alias /static /var/www/html/django/static
<Directory /var/www/html/django/static>
 Require all granted
</Directory>

<Directory /var/www/html/django/myproject>
  <Files wsgi.py>
    Require all granted
  </Files>
</Directory>

WSGIDaemonProcess myproject python-path=/var/www/html/django/.py3env/lib/python3.6/site-packages
WSGIScriptAlias / /var/www/html/django/myproject/wsgi.py

</VirtualHost>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章