0

I'm running Django with Python 3.6.1 on Ubuntu 14.04 and Apache 2.4.7 and using mod_wsgi 4.4.12 compiled with Python 3.6.1. If I start the Django server independently of my app and go to 127.0.1.1:8000, my app shows up just fine. If I let my app start the Django server, it looks like it starts -- no errors and my management GUI gets some feedback (shows the Python version) but going to the same URL gets me a web page showing the Apache HTML folder. If I switch to using Apache, I get the web page showing the Apache HTML folder. With Apache, 127.0.1.1 gives "Unable to connect" and 127.0.0.1 gives the default Apache Ubuntu page. The Apache log is not giving any errors.

The bottom of my /etc/apache2/apache2.conf file has:

    ServerName localhost
    WSGIApplicationGroup %{GLOBAL}
    WSGIPythonPath /home/user/myproject/myprojectenv/myproject

The /etc/apache2/sites-available/000-default.conf file has:

    Alias /static /home/user/myproject/myproject_static
    <Directory /home/user/myproject/myproject_static>
        Require all granted
    </Directory>

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

    WSGIDaemonProcess myproject python-home=/home/user/myproject/myprojectenv python-path=/home/user/myproject
    WSGIProcessGroup myproject
    WSGIScriptAlias / /home/user/myproject/myprojectenv/myproject/myproject/wsgi.py

The VirtualHost is set to *:8000.

Any ideas?

Terri Simon
  • 127
  • 1
  • 10
  • You created a project _inside_ your virtual env? – schrodingerscatcuriosity Aug 21 '18 at 16:54
  • The project was originally created as a Django project without a virtual environment (on Windows originally - I'm transferring it to Linux). The Django project has two main things under it - the browser interface and a TKinter GUI which includes a server daemon. When I made the virtual env, I copied what existed into the myprojectenv folder. – Terri Simon Aug 21 '18 at 16:58

0 Answers0