Report this

What is the reason for this report?

Apache default page in Django app Ubuntu

Posted on September 14, 2017

Hi, i’ve been fighting with my droplet for the last 2 days and a can’t figure out what’s happening because i’m new to VPS. Here’s my problem: I created a droplet sing Ubuntu 16 32bits. I followed the next tutrorial https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04 And this one too https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-ubuntu-16-04 The problem is with the last one. Everything it’s ok until i get to the apache configuration part, because no matter what i can’t get apache to show anything but the default page when i type the IP address in the browser. I’m sure it’s a silly error. Here’s my conf file:

<VirtualHost *:80>

        ServerName <some ip>
        DocumentRoot /home/pablo/myproject/myproject
        ServerAdmin webmaster@localhost

        ErrorLog ${APACHE_LOG_DIR}/error.
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        Alias /static /home/pablo/myproject/static
        <Directory /home/pablo/myproject/static>
                Require all granted
        </Directory>

        <Directory /home/pablo/myproject/myproject>
                <Files wsgi.py>
                        Require all granted
                </Files>
        </Directory>

        WSGIDaemonProcess myproject python-home=/home/pablo/myproject/myprojectenv python-path=/home/pablo/myproject
        WSGIProcessGroup myproject
        WSGIScriptAlias / /home/pablo/myproject/myproject/wsgi.py
</VirtualHost>

As you can see, it is not my Django project, it’s just the tutorial example. I just added the DocumentRoot and the ServerName to see if anything change but nothing happend.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.