[Fixed]-Django 1.10, Apache 2.4 Serving Basic App on CentOS7 Getting 403 Forbidden to /

1đź‘Ť

âś…

… do I or don’t I have to run python manage.py runserver in addition
to having HTTPD setup?

You don’t never do manage.py runserver in production besides you don’t need it either. That’s the whole point of setting up apache

Next let’s look at this:

 WSGIDaemonProcess testserver python-path=/home/dev/testserver:/home/venvs/django/lib/python3.6/site-packages

Though you have set the permissions for your home directory. What about the /home/venvs directory? that sounds like an entirely different user account. So have you changed the permissions and the groups accordingly for that one?

Secondly, you will need to make te /home/dev/testserver folder readable by apache as well and also executable. The execute flag on a directory is needed for a user to change into that directory. Often times you find that permissions are changed accidentally while the project is being transferred to the server.

👤e4c5

0đź‘Ť

Well, whether or not it is considered a solution because I never did get Apache + mod_wsgi working, but I did get it working through PyPi mod_wsgi.

Installed into the virtualenv and just followed the “Using mod_wsgi-express with Django” section.

👤cjones

Leave a comment