I am trying to give a Domain name and run multiple django projects on my apache, for the moment I managed to host one application and and run it on 127.0.0.1:8888 the settings look like this.
WSGIScriptAlias / C:/Users/ShabeerSheffa/workspace/ApacheDemo/ApacheDemo/wsgi.py
WSGIPythonPath C:/Users/ShabeerSheffa/workspace/ApacheDemo
<Directory C:/Users/ShabeerSheffa/workspace/ApacheDemo>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
I tried changing the above code to look like the code below, with a domain name so i could access it using apachedemo.com but failed miserably.
NameVirtualHost apachedemo.com
<VirtualHost apachedemo.com>
ServerName apachedemo.com
ServerAlias www.apachedemo.com
WSGIScriptAlias / C:/Users/ShabeerSheffa/workspace/ApacheDemo/ApacheDemo/wsgi.py
WSGIPythonPath C:/Users/ShabeerSheffa/workspace/ApacheDemo
DocumentRoot C:/Users/ShabeerSheffa/workspace/ApacheDemo
<Directory C:/Users/ShabeerSheffa/workspace/ApacheDemo>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
</VirtualHost>
I am currently using port 8888 for my apache on a windows 7 machine, 127.0.0.1:8888 worked for the first version of the code, but after editing the code apache gives an error when restarting apache.
This is how my host file looks like, i only added the last line.(not quite sure why there is a # in second and third line)
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1:8888 apachedemo.com www.apachedemo.com
I am trying to find answers for two questions-
- How do i make apachedemo.com work
- How do i add another project on the same server, example apachedemo2.com
EDIT: I am developing my projects using eclipse
Thanks alot for the help guys