By delta
i do not manage to deploy my web application.
I am using Python 3.4 Django1.7.b4 Django-bootstrap3 Apache2 Mod_wsgi Vitualenvironment Droplet Ubuntu 14.4
I have a running django application local on my window pc by running this cmd line Python manage.py runserver
Now I try to deploy it on my vps and I do not know We’re do I have to copy my django application? In which folder? Apache site config need virtual host configuration, but I have not domain name for the moment I will by one later but I would to see my web application on Internet by entering the fix ip of my droplet.
Could you please help me?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hey! There are a lot of ways to deploy a Django project. Are you running into a specific issue?
To deploy a Python app in a virtualenv using Mod_wsgi and Apache, first install the dependencies:
sudo apt-get install python-pip python-virtualenv libapache2-mod-wsgi apache2
Now put your Django project files onto the server and create your virtualenv. Generally a directory in /var/www/ will do. They key is to make sure to use the correct path is in your Apache configuration. If your virtualenv is located in /var/www/myapp/ then your Apache config (/etc/apache2/sites-enabled/000-default.conf ) would be:
<VirtualHost *:80>
ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/myapp
WSGIDaemonProcess myapp python-path=/var/www/myapp:/var/www/myapp/env/lib/python2.7/site-packages
WSGIProcessGroup myapp
WSGIScriptAlias / /var/www/myapp/myapp/wsgi.py
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
For more details, check out the article How to Run Django with mod_wsgi and Apache with a virtualenv Python environment on a Debian VPS
This comment has been deleted
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.