I purchased an SSL certificate from namecheap.com and posted the necessary files on my Ubuntu server (key and crt). I use mod_wsgi to serve my Django application with Apache. I'm having trouble installing an SSL certificate.
Current configuration (/etc/apache2/sites-available/000-default.conf)
<VirtualHost *:80>
ServerAdmin admin@example.com
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /static /home/Django/professor/static_root
<Directory /home/Django/professor/static_root>
Require all granted
</Directory>
<Directory /home/Django/professor/professor>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIDaemonProcess professor python-path=/home/Django/professor:/home/Django/professor-vm/lib/python2.7/site-packages
WSGIProcessGroup professor
WSGIScriptAlias / /home/Django/professor/professor/wsgi.py
</VirtualHost>
I commented out the lines for the SSL certificate. Currently, my application is working fine, but when I uncomment the lines to include an SSL certificate, my site is serving files from / var / www, not the application. Any ideas?
source
share