The thing is, I have a django project installed in a subdomain in localhost, and at the same time I have a local host for other things without Django.
When I access a1.localhost, it displays my django welcome page in order, but when I want to access only the local host, it also displays the same django welcome page, not index.html.
So far this is what I have:
Hosts: 127.0.0.1 localhost 127.0.0.1 a1.localhost vhosts.conf: #-- a1.localhost <VirtualHost *:80> ServerName a1.localhost WSGIScriptAlias / "C:/workspace/website1/apache/django.wsgi" <Directory "C:/workspace/website1/apache"> Order allow,deny Allow from all </Directory> </VirtualHost> #-- localhost <VirtualHost *:80> ServerName localhost DocumentRoot "C:/workspace/website1/django_project" </VirtualHost> django.wsgi import os import sys path = "C:/workspace/website1/apache/django_project" if path not in sys.path: sys.path.append(path) os.environ['DJANGO_SETTINGS_MODULE'] = 'django_project.settings' import django.core.handlers.wsgi
I want to get the normal index.html file displayed in localhost and my django project in a1.localhost.
Thanks.
source share