I have my php based apps running on my server on AWS EC2 (Apache2, Ubuntu 14.04). I'm trying to deploy a Flask application on a sub domain. Since I don't have any experience in deploying Flask applications, I'm following this and this tutorial.
This is my virtual host file:
VirtualHost *:80>
ServerName sub.domain.com
ServerAdmin [email protected]
WSGIScriptAlias / /var/www/myFlaskApp/myFlaskApp.wsgi
<Directory /var/www/myFlaskApp/myFlaskApp/>
Order allow,deny
Allow from all
</Directory>
Alias /static /var/www/myFlaskApp/myFlaskApp/static
<Directory /var/www/myFlaskApp/myFlaskApp/static/>
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
I saved this file as /etc/apache2/sites-available/sub.domain.com.config
. When I tried sudo a2ensite sub.domain.com.config
. It's throwing Site sub.domain.com.config does not exist!
.
I appreciate any kind of help.