【问题标题】:Is there any way that i can host my django project along site cgi mode site (bugzilla)有什么方法可以让我在站点 cgi 模式站点 (bugzilla) 上托管我的 django 项目
【发布时间】:2020-04-17 00:07:46
【问题描述】:

我正在尝试在我之前托管过我的 django 项目的 apache2 服务器上托管 bugzilla。我想作为子域访问这两个网站 有什么办法可以吗

我的配置文件是:

000-default.conf:

<VirtualHost *:80>
        ServerName health-diagnosis.com
        ServerAlias health-diagnosis.com
        ServerAdmin ladbhupesh1369@gmail.com
        DocumentRoot /var/www/html
        Alias /static /var/www/html/webproject/static
    <Directory /var/www/html/webproject/static>
        Require all granted
    </Directory>
    <Directory /var/www/html/webproject/webproject> 
        <Files wsgi.py>
            Require all granted
        </Files>
    </Directory>
    WSGIDaemonProcess webproject python-path=/var/www/html/webproject python-home=/var/www/html/webproject/myvenv
    WSGIProcessGroup webproject
    WSGIScriptAlias / /var/www/html/webproject/webproject/wsgi.py
    ErrorLog /var/www/logs/error.log
    CustomLog /var/www/logs/custom.log combined

</VirtualHost>

bugzilla.conf:

ServerName localhost
<Directory /var/www/html/bugzilla>
AddHandler cgi-script .cgi
Options +ExecCGI
DirectoryIndex index.cgi index.html
AllowOverride All
</Directory>

【问题讨论】:

    标签: python apache cgi django-wsgi


    【解决方案1】:

    我发现我必须为每个应用设置不同的ServerName,ServerAlias

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-06-09
      • 2019-12-13
      • 1970-01-01
      • 1970-01-01
      • 2011-05-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多