2

I'm developing a django website and am currently working on deploying. I'm following this tutorial. And im in the last stage of the tutorial (1:08:00 in the video). After he finished configuration th django-project.conf file he saves and everything is working, but me on the other hand, i get an:

Not Found

The requested URL / was not found on this server.

Apache/2.4.34 (Ubuntu) Server at **** Port 80

This is my projects .conf file:

<VirtualHost *:80>
    ServerName _
    Redirect 404 /
    Alias /static /home/user/project/static
    <Directory /home/user/project/static>
        Require all granted
    </Directory>
    <Directory /home/user/project/project>
        <Files wsgi.py>
            Require all granted
        </Files>
    </Directory>
    WSGIScriptAlias / /home/user/project/project/wsgi.py
    WSGIDaemonProcess project_app python-path=/home/user/project python-home=/home/user/project/venv
    WSGIProcessGroup project_app
</VirtualHost>

This is my urls.py:

from django.contrib import admin
from django.urls import path, include
from . import views

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', views.homepage),
    path('rh/', views.rh, name="rh"),
    path('gvt/', views.gvt, name="gvt"),
    path('fth/', views.fth, name="fth"),
    path('pages/', include('pages.urls')),
]

This is my wsgi.py

from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'excelsite.settings')
application = get_wsgi_application()

sys.path.append('/home/alexholst/excelsite')

This is the error.log (Couldnt copy, so i have this screenshot instead) here

Community
  • 1
  • 1
alexholstv
  • 146
  • 1
  • 10

0 Answers0