1

Is there a way to host multiple domains with Apache web server without making any changes to the DNS server? I have full control over the Apache server and no control over the DNS server.

4

Do the DNS records for those domains all point to your Apache server? If so, then the answer is yes. If all of the domains should serve the same content, then there's nothing more you need to do. If you want them to serve different content, then you need to set up name-based virtual hosts.

If the domains don't resolve to an IP address of your Apache server, then you need the cooperation of the servers where they are currently pointing to, to proxy (or failing that, redirect) the requests to your server. Otherwise, your server will never see the requests, and there's nothing to be done.

2

Figured it out. I use django with mod_wsgi, and this is how I ended up getting it to work

NameVirtualHost *:80

<VirtualHost *:80>
ServerName b2m1.int.---.com
WSGIScriptAlias / "C:/portal/django.wsgi"
Alias /static/ "C:/portal/inspections/static/"

<Directory "C:/portal/">
Order deny,allow
Allow from all
</Directory>
</VirtualHost>

NameVirtualHost *:8000

<VirtualHost *:8000>
ServerName b2m1.int.---.com
WSGIScriptAlias / "C:/dailyplanning/django.wsgi"
Alias /static/ "C:/dailyplanning/plans/static/"

<Directory "C:/dailyplanning/">
Order deny,allow
Allow from all
</Directory>

</VirtualHost>

NameVirtualHost *:8080

<VirtualHost *:8080>
ServerName b2m1.int.---.com
DocumentRoot "C:/portal/redirect/"

<Directory "C:/portal/">
Order deny,allow
Allow from all
</Directory>
</VirtualHost>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.