如何使用Apache2在同一台服务器上部署Shiny应用程序和Django应用程序?

时间:2019-08-02 12:37:39

标签: django apache shiny

我想使用apache2在同一台服务器上部署django应用程序和Shiny应用程序。我已经为这两个应用程序设置了配置,并且它们可以独立工作。但是,当两个站点都启用时,它们将不起作用。我该如何使用它?

Django应用程序配置:

djangoapp.conf

  script:
    - some commands
    - ...
    - touch $CI_PROJECT_DIR/success
  after_script:
    - |
      if [ -e success ]; then
        echo on success
      else
        echo on failure
      fi
```

闪亮的应用程序配置:

shinyapp.conf

LoadModule wsgi_module "/home/djangoapp/config/env/lib/python3.6/site-packages/mod_wsgi/server/mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so"
WSGIPythonHome "/home/djangoapp/config/env"

<VirtualHost *:80>
    ServerName www.example.com
    ServerAlias example.com
    ServerAdmin webmaster@localhost

    DocumentRoot /usr/local/Django/DjangoApp

    <Directory /usr/local/Django/DjangoApp>
        Require all granted
    </Directory>


    ErrorLog ${APACHE_LOG_DIR}/djangoapp_error.log
    CustomLog ${APACHE_LOG_DIR}/djangoapp_access.log combined

    WSGIScriptAlias / /usr/local/Django/DjangoApp/myapp/wsgi.py
    WSGIProcessGroup example.com
    WSGIDaemonProcess example.com python-home=/home/djangoapp/config/env python-path=/usr/local/Django/DjangoApp

    <Directory /usr/local/Django/DjangoApp/myapp>
        <Files wsgi.py>
            Require all granted
        </Files>
    </Directory>

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

</VirtualHost>

同时启用两个站点时,ShinyApp

0 个答案:

没有答案