ServerName test.test.nz
ServerAdmin webmaster@localhost
DocumentRoot /home/aut/sampleapp
WSGIScriptAlias /home/aut/sampleapp /home/aut/sampleapp/sampleapp/wsgi.py
WSGIPythonPath /home/aut/sampleapp:/home/aut/sampleapp/env/lib/python2.7/site-packages
<Directory /home/aut/sampleapp>
AllowOverride None
Options +FollowSymLinks
Order allow,deny
Allow from all
Require all granted
</Directory>
<Directory /home/aut/sampleapp/sampleapp>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
The above is the configuration for virtual host port 80. After restarting Apache, I got no errors, but when I go to test.test.nz, I get:
The requested URL / was not found on this server.
"/home/aut/sampleapp/" is where manage.py is, within that directory, there is another folder called "sampleapp" which contains the urls.py, wsgi.py etc..
The urls.py has been edited to set the app as the index page:
from django.conf.urls import url
from django.contrib import admin
from django.contrib.sitemaps import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^admin/', admin.site.urls),
]
What seems to be the problem?
Any help or direction would be appreciated.
Thanks in advance,
DocumentRootto be a directory containing your source code, it weakens the security of your setup as any stuff up and people may be able to download your source code. Make sure you use daemon mode of mod_wsgi. Setting up of Python virtual environment better done other ways. See blog.dscpl.com.au/2012/10/… blog.dscpl.com.au/2009/11/save-on-memory-with-modwsgi-30.html blog.dscpl.com.au/2014/09/…