LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   I have URL/Domain domain_url.com I want to add "media." (media.domain_url.com), how? (http://www.linuxquestions.org/questions/linux-server-73/i-have-url-domain-domain_url-com-i-want-to-add-media-media-domain_url-com-how-658771/)

brynjarh 07-28-2008 09:01 AM

I have URL/Domain domain_url.com I want to add "media." (media.domain_url.com), how?
 
I have a server running apache2 and lighttpd with two domains or URLs (not sure what to call it) directing there, so when I go to http://www.domain1_url.com/ I'm really looking at something like http://128.177.27.91/ (/var/www/html/), which apache2 is serving, and when I go to http://www.domain1_url.com:81/ or http://128.177.27.91:81/ (/var/www/light/) I go to what lighttpd is serving, the other domain/URL follows the same logic.

Now what I want to do is make domain-1 do what it's doing now except instead of adding :81 to access what lighttpd is serving I want to use http://media.domain1_url.com/ , that is, add "media." to the front instead of :81 to the end.

What I want to do with domain-2 is to point to http://128.177.27.91/domain2/ (/var/www/html/domain2/), so that when I go to http://www.domain2_url/ it's really showing me http://128.177.27.91/domain2/ , like domain1 is showing me http://128.177.27.91/

How do I go about doing this? An answer and a link to appropriate documentation or just a link to the appropriate documentation would be nice.

vwvr9 07-28-2008 09:08 AM

I think you should be looking at creating subdomains on the DNS level or setting up virtual hosts on Apache.

vladmihaisima 07-28-2008 10:06 AM

As the previous poster said, first you need that media.domain1_url.com point to your ip address (when you do "ping media.domain1_url.com" your ip should respond) . This has to be changed in the DNS server (depends where you got the domains from and how it is configured). Some providers have web interfaces to change that, if you host your own name server you have to modify BIND configuration files.

ddaemonunics 07-28-2008 11:50 AM

Well like the others said you have to have a basic understanding of DNS, domains, and related services bind,apache etc
Try and have a look at ISPConfig which integrate all this services
and allow you to configure dns resolution, virtual hosts etc (basic web hosting).
It also have a very good documentation and I 'am sure that configuring ISPconfig will halp you understand better the things involved

http://www.ispconfig.org/


All times are GMT -5. The time now is 01:18 PM.