LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Apache automatic domains (https://www.linuxquestions.org/questions/linux-server-73/apache-automatic-domains-524451/)

70mas 01-31-2007 02:12 PM

Apache automatic domains
 
Hello

I would like to set up Apache virtual hosts to automatically assign document roots for domains and subdomains. Id rather describe it in example:

Code:

subdomain.domain.com -> /www/com/domain/subdomain
a.b.c.d.e.f.g.h.infinite.depth.domain.com -> /www/com/domain/depth/infinite/h/g/f/e/d/c/b/a

I would like something that is very universal and can be used with any domain without configuration.

Is that possible? Can you please suggest me something to do that?

Thanks.

jantman 02-01-2007 12:51 AM

I've looked into the same thing.

You might try searching for an apache module to do it, but the answer that I came up with is that it's nearly impossible. Everything that I read said that Apache only selects virtual hosts by IP and port, not by the requested DNS information, as this never makes it to the server - the client simply resolves it into an IP.

Perhaps you could set them up with your registrar manually for forwarding to specific URLs or ports.

Maybe someone else can chime in here?


All times are GMT -5. The time now is 04:36 AM.