Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: ServerAlias of VHost ?? |
|
Author |
|
Lutz-R. Frank
Joined: 03 Dec 2005 Posts: 21 Location: Germany
|
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Mon 24 Jul '06 17:09 Post subject: |
|
|
Sure, mod-rewrite is the way to go.
Steffen |
|
Back to top |
|
Mitron
Joined: 04 Jan 2006 Posts: 63
|
Posted: Tue 25 Jul '06 12:00 Post subject: |
|
|
Hmm, mod_rewrite will also work. However, I just do something like this in my httpd-vhosts.conf to achieve the results you list above:
Code: | <VirtualHost *:80>
ServerAdmin webmaster@mydomain.com
DocumentRoot /www/mydomain.com/htdocs
ServerName mydomain.com
ServerAlias www.mydomain.com
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@mydomain.com
DocumentRoot /www/mydomain.com/htdocs/aaa
ServerName mydomain.com
ServerAlias aaa.mydomain.com
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@mydomain.com
DocumentRoot /www/mydomain.com/htdocs/bbb
ServerName mydomain.com
ServerAlias bbb.mydomain.com
</VirtualHost> |
This will allow you three domains from the main server, two of which are served from sub-folders under your main site. Of course you could locate the two domains anywhere besides under the main site as well.
Be aware that if you're running dynamic DNS through Zone Edit, you will also have to assign the aaa.mydomain.com and bbb.mydomain.com to your IP Address fields for that zone. Also in your Dynamic Update application, I use Site Developers, you may also have to create an entry for each domain in order to update your IP's.
Hope that helps. |
|
Back to top |
|
|
|
|
|
|