Hello @lazyvec.bl,
I have been able to deploy two different Django applications one to the root domain and another to a subdomain using the previously linked guide. Before sharing Apache's conf files, it is worth noting that you need to use approach A as you are using one of the new versions that use System Packages.
Having two apps testing1
and testing2
to be served in our domain example.com
, one possible configuration would be:
- Configure both apps for public access following the guide and create the superuser.
- Create custom vhost configuration at
/opt/bitnami/apache2/conf/vhosts/testing1-http-vhost.conf
that will be served in the subdomain:
<IfDefine !IS_testing1_LOADED>
Define IS_testing1_LOADED
WSGIDaemonProcess testing1 python-home=/opt/bitnami/python python-path=/opt/bitnami/projects/testing1
</IfDefine>
<VirtualHost 127.0.0.1:80 _default_:80>
ServerName testing1.example.com
WSGIProcessGroup testing1
Alias /robots.txt /opt/bitnami/projects/testing1/static/robots.txt
Alias /favicon.ico /opt/bitnami/projects/testing1/static/favicon.ico
<Directory /opt/bitnami/projects/testing1/static>
Require all granted
</Directory>
WSGIScriptAlias / /opt/bitnami/projects/testing1/testing1/wsgi.py
<Directory /opt/bitnami/projects/testing1/testing1>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
</VirtualHost>
- Create custom vhost configuration at
/opt/bitnami/apache2/conf/vhosts/testing2-http-vhost.conf
that will be served in the root domain:
...
<VirtualHost 127.0.0.1:80 _default_:80>
ServerAlias example.com
WSGIProcessGroup testing2
...
sudo /opt/bitnami/ctlscript.sh restart apache
Could you try reproducing my steps and check whether it works for you?
Regards,
Francisco de Paz