Yes, it is possible. I run a LAMP Stack on my DigitalOcean droplet that hosts a dozen live django websites. It's all really focused around your virtual environment setup in your site configuration.
Here is an example, that if you study should be enough to get you going...
/etc/apache2/sites-available/website1.com.conf
<VirtualHost *:80>
ServerName website1.com
ServerAlias www.website1.com
ServerAdmin youremail@domain.com
DocumentRoot /var/www/html/website1.com/djangoproject
WSGIScriptAlias / /var/www/html/website1.com/djangoproject/djangoproject/wsgi.py
WSGIDaemonProcess website1.com processes=2 threads=15 display-name=%{GROUP} \
python-home=/var/www/html/website1.com/venv \
python-path=/var/www/html/website1.com/ainet
WSGIProcessGroup website1.com
<Directory/var/www/html/website1.com/djangoproject>
AllowOverride all
Require all granted
Options FollowSymlinks
</Directory>
Alias /static/ /var/www/html/website1.com/djangoproject/static/
<Directory /var/www/html/website1.com/djangoproject/static/>
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
/etc/apache2/sites-available/website2.com.conf
<VirtualHost *:80>
ServerName subdomain.website1.com
ServerAlias subdomain.website1.com
ServerAdmin youremail@domain.com
DocumentRoot /var/www/html/subdomain.website1.com/djangoproject
WSGIScriptAlias / /var/www/html/subdomain.website1.com/djangoproject/djangoproject/wsgi.py
WSGIDaemonProcess subdomain.website1.com processes=2 threads=15 display-name=%{GROUP} \
python-home=/var/www/html/subdomain.website1.com/venv \
python-path=/var/www/html/subdomain.website1.com/ainet
WSGIProcessGroup subdomain.website1.com
<Directory/var/www/html/subdomain.website1.com/djangoproject>
AllowOverride all
Require all granted
Options FollowSymlinks
</Directory>
Alias /static/ /var/www/html/subdomain.website1.com/djangoproject/static/
<Directory /var/www/html/subdomain.website1.com/djangoproject/static/>
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
The above assumes that you put your django project in /var/www/html/website1.com/
. It also assumes this same folder contains your virtual environment located in the venv
folder.
/var/www/html/website1.com
/var/www/html/website1.com/djangoproject
/var/www/html/website1.com/venv
/var/www/html/subdomain.website1.com
/var/www/html/subdomain.website1.com/djangoproject
/var/www/html/subdomain.website1.com/venv
However, if you need a testing page as you say, Django has a built in local development server that I highly recommend you use.
Once you've got your environment set up it's as easy as running python manage.py runserver
.