Django Project Setup on Google VM
<p>I am trying to setup a django project on a VM by Google Compute Engine. I have done all the installations &amp; have copied the project on my VM. But I am not able to do the Apache/mod_wsgi Or Gunicorn/Nginx linking to make the project run end to end on the final IP address of VM. </p>

<p>I have two queries:</p>

<p>1) Which one is better Apache/mod_wsgi OR Gunicorn/Nginx OR any other ?</p>

<p>2) Can someone please explain in simple step by step way to do this linking?  </p>

<p>Any one way Or some good Reference Link would also be appreciated.</p>

<p>Thanks,</p>

<p>Add the Following Code in /etc/apache2/sites-available/000-default.conf File.
Do make corresponding changes acc. to your project path.</p>

<p>1) sudo vim /etc/apache2/sites-available/000-default.conf</p>

<p>2) Add below code between  &amp; </p>

<pre><code>&lt;VirtualHost *:80&gt;
    . . .

    Alias /static /home/user/myproject/static
    &lt;Directory /home/user/myproject/static&gt;
        Require all granted
    &lt;/Directory&gt;

    &lt;Directory /home/user/myproject/myproject&gt;
        &lt;Files wsgi.py&gt;
            Require all granted
        &lt;/Files&gt;
    &lt;/Directory&gt;

    WSGIDaemonProcess myproject python-path=/home/user/myproject:/home/user/myproject/myprojectenv/lib/python2.7/site-packages
    WSGIProcessGroup myproject
    WSGIScriptAlias / /home/user/myproject/myproject/wsgi.py

&lt;/VirtualHost&gt;
</code></pre>

<p>3) sudo chown :www-data ~/myproject/</p>

<p>4) sudo service apache2 restart</p>

<p>Now try hitting your IP address. Enjoy!</p>

<p>Hope this might be helpful.</p>

<p>Thanks,</p>

python django nginx virtual-machine google-compute-engine