|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi, I am currently hosting some friends' web sites. I would like to have it look like http://username.mydomain.com instead of http://www.mydomain.com/~username through the use of public_html directory. By using username.mydomain.com, currently I have to add a virtual host tag like this:
<VirtualHost 1.2.3.4> ServerName user1.mydomain.com SeverAlias www.user1.mydomain.com DocumentRoot /home/user1 </VirtualHost> Then in the named zone file, I have to add an entry that would look like this: user1 CNAME mydomain.com. Or else it won't work when user1 try to access http://user1.mydomain.net. and restart the named and apache server. This is ok, but a little bit of work. So my question is that if there are any way at all to do this dynamically through apache only but not through named. |
|
#2
|
|||
|
|||
|
No. I dont think there is because of the way the www works. The Browser asks your NS for the IP of the Domain, so named (bind) has to know it.
But the other way (only named) is possible through "URL rewriting". search for this on apache.org. Its easy if you know how to use regular expressions. wait. maybe bind supports something like "*.your-domain.com 1.2.3.4". Really cant tell. Does anybody know? |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > Virtual Hosting again.. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|