[PLUG] Virtual hosting IP and namebase

Josh Orchard josh at emediatedesigns.com
Fri Apr 26 09:17:40 UTC 2002


Thank you.  This will solve the issue with the apache server.  I can put
them in order and if they use the ip number then I can have the default go
to a main page of a generic page.

Now I just need to see if proftp has this same ability. I think it does
but I really don't know.

I guess ssh will have the same limitation but that isn't so bad as they
have to have a user account.

Is there a way to limit who can ssh into a box?  That would work.


Thanks for all the answers everyone.  I see this will not be so difficult.
Minus the fact that I think I'll have to add a DNS server to my box also.
That is just to give me more control and flexibility.


Josh

> In your httpd.conf file, you would follow the IP defined host with the
> name-based hosts.
>
> NameVirtualHost 123.345.543.321
>
> <VirtualHost 123.345.543.321>
> UseCanonicalName off
> ServerAdmin hostmaster at user1domain.com
> ServerName user1domain.com
> DocumentRoot /home/user1/www
> CustomLog /home/user1/logs/access.log combined
> ErrorLog /home/user1/logs/error.log
> </Directory>
> </VirtualHost>
>
>
> <VirtualHost 123.345.543.321>
> UseCanonicalName off
> ServerAdmin webmaster at user2domain.com
> ServerName user2domain.com
> DocumentRoot /home/user2/www
> CustomLog /home/user2/logs/access.log combined
> ErrorLog /home/user2/logs/error.log
> </Directory>
> </VirtualHost>
>
> Add your other stuff like you always would.
>
> If someone uses the IP (123.345.543.321), they would land at
> user1domain.com.
>
> I don't know if there's a limit to how many name-based domains that can
> share a single IP, but certainly you can do a couple of hundred with no
> problem.
>
> Initially, I had trouble getting name-based to work.  The key, for
> reasons I have no idea, was to add the line:
>   UseCanonicalName off
> Then everything worked.
>
> One way to do the DNS would be to CNAME www.user2domain.com to
> user1domain.com
> and have an A record for user1domain.com defined with the IP address
> 123.345.543.321.
>
> Hope this is what you were looking for.
>
> -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
> Day Tooley
> day at webfooters.com
> http://www.webfooters.com
>
>
> ----- Original Message -----
> From: "Josh Orchard" <josh at emediatedesigns.com>
> To: <plug at lists.pdxlinux.org>
> Sent: Thursday, April 25, 2002 8:17 PM
> Subject: [PLUG] Virtual hosting IP and namebase
>
>
>> Hello all,
>>
>> I have been virtually hosting for a few sites by using IP numbers.
>> What I would like to know if I can continue to do that and add ones
>> that do not have their own IP?
>>
>> So, for example....
>>
>> hostname         IP
>> host1.com        123.123.123.123
>> host2.com        123.123.123.124
>>
>> host3.com        no IP  but would resolve to 123.123.123.123
>>
>> Then in Apache and proftp I could setup the hostname to resolve
>> correctly.
>>
>> Question is what do I do with if they try to login with the IP?  Can I
>> stop that?  Is there a way to only allow connections with the name?
>> Can I do use postfix to have if do the multiple names as well without
>> the IP or having them all go to the same IP?
>>
>> Just wondering if adding another name is going to cause problems
>> because I currently have an IP for each hostname on the machine and
>> the DNS record has that as well.
>>
>> Thanks for the help.
>>
>> Josh
>
>
>
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug







More information about the PLUG mailing list