运行 https://example.org/directory 中的 django - python 和 php
Run django in https://example.org/directory - python and php
我有一个网站 https://example.org (HTTPS) php,Apache2。我需要在同一台服务器 (Centos 6) 上 运行 Django 应用程序。
是否可以在 https://example.org/my_django_app/ 中执行 django 应用程序?
我可以在子域中执行(http://my_django_app.example.org/),这里的问题是我需要为子域购买另一个证书。
回答
在虚拟主机配置(Apache 2.2)中,更改正常配置
WSGIScriptAlias / /my/route/wsgi.py
指定目录名称。
WSGIScriptAlias /directory /my/route/wsgi.py
你的 Django 项目 运行 在 https://example.org/directory 和你的 https://example.org 执行 php
编辑虚拟主机配置,并添加 python
的配置
WSGIDaemonProcess inti python-path=/path/to/myproject:/path/to/env/lib/python2.7/site-packages
WSGIProcessGroup inti
WSGIScriptAlias /directory /path/to/wsgi.py
我有一个网站 https://example.org (HTTPS) php,Apache2。我需要在同一台服务器 (Centos 6) 上 运行 Django 应用程序。
是否可以在 https://example.org/my_django_app/ 中执行 django 应用程序?
我可以在子域中执行(http://my_django_app.example.org/),这里的问题是我需要为子域购买另一个证书。
回答
在虚拟主机配置(Apache 2.2)中,更改正常配置
WSGIScriptAlias / /my/route/wsgi.py
指定目录名称。
WSGIScriptAlias /directory /my/route/wsgi.py
你的 Django 项目 运行 在 https://example.org/directory 和你的 https://example.org 执行 php
编辑虚拟主机配置,并添加 python
的配置WSGIDaemonProcess inti python-path=/path/to/myproject:/path/to/env/lib/python2.7/site-packages
WSGIProcessGroup inti
WSGIScriptAlias /directory /path/to/wsgi.py