0

I am fairly new to the world of Ubuntu and apache2. And I've become a little confused of the directories and some other stuff.

  1. I have read that the default web directory is /var/www/. I have my project in /home/user/project. Is that wrong?

  2. Also I've actually gotten my project to work, a Django website, but right after I got the SSL-certification, it stopped working. I have tried to change the document root to the path where my project is, in every file. (apache2.conf, website.conf, website-le-ssl.conf). Can someone tell how I can get my site to work? NOTE: I am greeted with the page: 403 Forbidden: You don't have permission to access this resource.

  3. I have tried some different configurations regarding my files (Mentioned above), and i have also been greeted by the: index of / page.

I really have no idea what to do now. I have searched on google, and the various forum, but nothing that i have tried works for me.

5
  • Regarding home directory projects: askubuntu.com/questions/767504/…
    – Thomas Ward
    Aug 5, 2020 at 13:51
  • @ThomasWard so i have moved all my files and followed along with the steps that you have mention. Now i am getting the index of/ page with all the content of my project folder. How can i now get it to show the actual webpage? Aug 5, 2020 at 14:15
  • You need to serve the Django application via WSGI either with Apache or uwsgi separately. See docs.djangoproject.com/en/3.0/howto/deployment/wsgi/modwsgi as an example. (I'm on my phone or I'd write an answer)
    – Thomas Ward
    Aug 5, 2020 at 14:17
  • @ThomasWard I have followed the instructions on the page you linked, but i still only have the "Index of/" page. Aug 5, 2020 at 16:50
  • This answer explains in detail how to set up a Django project with Apache2: askubuntu.com/a/1261929/1107236 . It may be of help.
    – turbulence
    Aug 19, 2020 at 17:51

0

You must log in to answer this question.

Browse other questions tagged .