I am trying to give a domain name and run several django projects on my apache, at the moment I managed to host one application and run it on 127.0.0.1:8888 . 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 to modify the code above to look like the code below with the domain name, so I could access it using apachedemo.com , but failed.
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 what my host file looks like, I just added the last line. (not quite sure why there are # in the second and third lines)
# 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 to two questions -
- How to make apachedemo.com work
- How to add another project to one server, for example apachedemo2.com
EDIT: I develop my projects using eclipse
Thank you very much for helping the guys
shabeer90
source share