I have created a Flask Application based on the Large Application Structure in Miguel Grinberg's Flask Web Development Book. I have followed the tutorial in how-to-deploy-a-flask-application-on-an-ubuntu-vps and have managed to deploy a single file Flask application on my server. What changes/ modifications do I have to implement to my .wsgi file and apache config to be able to host Large Structured applications?
My Apache2 .conf file:
<VirtualHost *:80>
ServerName devrupt.com
ServerAdmin lui@devrupt.com
WSGIScriptAlias / /var/www/Devrupt/devrupt.wsgi
<Directory /var/www/Devrupt/Devrupt/>
Order allow,deny
Allow from all
</Directory>
Alias /static /var/www/Devrupt/Devrupt/static
<Directory /var/www/Devrupt/Devrupt/static/>
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
My .wsgi file:
#!/usr/bin/python
import sys
import logging
logging.basicConfig(stream=sys.stderr)
sys.path.insert(0,"/var/www/Devrupt/")
from Devrupt import app as application
application.secret_key = 'Add your secret key'