I am trying to setup the Django app on Apache2 server with Ubuntu.
I used the following tutorials to do the essentials.  

<https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-ubuntu-14-04>

I also used the following solution but it did not work for me.  

[Django (wsgi) and Wordpress coexisting in Apache virtualhost](https://stackoverflow.com/questions/3534678/django-wsgi-and-wordpress-coexisting-in-apache-virtualhost)

Other References:  

<https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/modwsgi/>

My config file for apache2 is as follows.

```
<VirtualHost *:80>

    Alias /static /home/ubuntu/test_pfi_app/static
    #Alias /media /home/ubuntu/test_pfi_app/media

    #DocumentRoot /var/www/html

    <Directory /home/ubuntu/test_pfi_app/static>
        Require all granted
    </Directory>

    WSGIDaemonProcess myproject python-path=/home/ubuntu/test_pfi_app:/usr/local/lib/python2.7/site-packages
    WSGIProcessGroup myproject
    WSGIScriptAlias /django /home/ubuntu/test_pfi_app/myproject/wsgi.py process-group=myproject
    #WSGIScriptAliasMatch /django /home/ubuntu/test_pfi_app/myproject/wsgi.py

    <Directory /home/ubuntu/test_pfi_app/myproject>
        <Files wsgi.py>
            Require all granted
        </Files>
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

<VirtualHost *:80>
ServerName app1.example.co.in
DocumentRoot /var/www/html/ocdemo
</VirtualHost>

<VirtualHost *:80>
ServerName app2.example.co.in
DocumentRoot /var/www/html/echosuat
</VirtualHost>

<VirtualHost *:80>
ServerName task.example.co.in
DocumentRoot /var/www/html/tasks
</VirtualHost>

```

I am able to access the django app using `IP/django` but accessing the root of the server redirects to the the `/var/www` url as shown in the below image.

[![enter image description here](https://i.stack.imgur.com/PfT42.png)](https://i.stack.imgur.com/PfT42.png)

And all the other apps are accessible from `IP/html/app_name` while they should be accessible from `IP/app_name`

I am unable to make the correct configuration in the configuration file.

Also, I am unable to see the "welcome to django" page on accessing `IP/django`. It rather gives a "**Page not found (404)**" 

**Not getting the default django page, on accessing `IP/django`.**  

[![enter image description here](https://i.stack.imgur.com/JDwjq.png)](https://i.stack.imgur.com/JDwjq.png)

**Getting this page on accessing `IP/django`**  

**Though, `IP/django/admin` works fine.**  

[![enter image description here](https://i.stack.imgur.com/utRJQ.png)](https://i.stack.imgur.com/utRJQ.png)