KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I want to host several sites with under the same server which uses Debian 5, say I have site1 , site2 and site3 , and assume my ip is 155.55.55.1 : site1: 155.55.55.1:80 , script at /opt/django/site1/ site2: 155.55.55.1:8080, script at /opt/django/site2/ site3: 155.55.55.1:8090, script at /opt/django/site3/ Here is my apache default: <VirtualHost *:80> ServerName / ServerAlias */ DocumentRoot /opt/django/site1/ LogLevel warn WSGIScriptAlias / /opt/django/site1/apache/django.wsgi Alias /media /opt/django/site1/media/statics Alias /admin_media /home/myuser/Django-1.1/django/contrib/admin/media </VirtualHost> <VirtualHost *:80> DocumentRoot "/usr/share/phpmyadmin" ServerName /phpmyadmin Alias /phpmyadmin /usr/share/phpmyadmin <Directory /usr/share/phpmyadmin> Options Indexes FollowSymLinks AllowOverride None Order Deny,Allow Allow from all </Directory> </VirtualHost> And here is my wsgi config for site1 , at /opt/django/site1/apache/django.wsgi : import os, sys import django.core.handlers.wsgi sys.path.append('/opt/django') sys.path.append('/opt/django/site1') os.environ['DJANGO_SETTINGS_MODULE'] = 'site1.settings' application = django.core.handlers.wsgi.WSGIHandler() How can I add site2 and site3 , which are Django-based sites and will be served like site1 ?
Tags (comma-separated)
Save Edits
Cancel