: Host multiple domains with Apache 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
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.
More posts by @Cugini213
2 Comments
Sorted by latest first Latest Oldest Best
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>
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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.