[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: subdomains



Yoni Elhanani writes:

 > I'm looking into using subdomains on my server.
 > I have 1 ip / 1 machine and i want to set:
 > 
 > 1. ftp to be set on ftp.domain only
 > 2. httpd to be set on www.domain only with a mask for username.domain
 > for local user directories, i think it is called VirtualHost under
 > apache config.
 > 3. mail pop3/smtp servers to be at mail.domain but mail will be to
 > user@domain rather than user@mail.domain
 > 4. irc server (not yet installed, any recommendation?) to be set on
 > irc.domain

If you mean by that that you want the FTP daemon only to respond when
someone connects to ftp.domain.com and not to say www.domain.com, when
both of them are the same IP, it's impossible, because the FTP server
(and the IRC server and others) don't know what hostname the client
used to look up its IP. The situation is a bit different for httpd
because clients send the hostname along with the request, so the
server does have that information in the case of httpd. You can use it
with the VirtualHost directive as you said, check the Apache docs for
info (it's not complicated). With anything other than httpd you can't
do what you wanted unless you allocate a different IP for each service.


-- 
Alex Shnitman                            | http://www.debian.org
alexsh@hectic.net, alexsh@linux.org.il   +-----------------------  
http://alexsh.hectic.net    UIN 188956    PGP key on web page
       E1 F2 7B 6C A0 31 80 28  63 B8 02 BA 65 C7 8B BA

Minds are like parachutes... they work best when open.