Koozali.org: home of the SME Server

Obsolete Releases => SME Server 9.x => Topic started by: DanB35 on April 18, 2016, 04:22:09 PM

Title: Multiple hosts on same domain
Post by: DanB35 on April 18, 2016, 04:22:09 PM
I'm running into a name resolution issue on an internal SME server, and hoping to get some guidance on how to address it.

I'm running an SME9 server in server/gateway mode as my main server.  It's configured as mydomain.tld, with hostnames of e-smith.mydomain.tld (yeah, my installation is that old), www.mydomain.tld, mail.mydomain.tld, etc.  As far as the internet is concerned, *.mydomain.tld is that server.  It has other domains on it as well, but I don't think they're relevant.

I have a second, internal SME9 server running in server-only mode as sme-chat.mydomain.tld.  I've deleted all other hostnames in the server-manager.  When, on the second server, I look up mydomain.tld, it responds with its own IP.  When I look up www.mydomain.tld, it gives "host not found".  I've tried entering the IP of my main server in the "corporate DNS" field with no change to this behavior.

How do I get sme-chat to return the IP of the main server for any hostname other than sme-chat.mydomain.tld?
Title: Re: Multiple hosts on same domain
Post by: ricks1950 on April 18, 2016, 09:23:25 PM
In the "Hostnames and addresses" panel of your chat server, add the www server with its correct ip, and it will be found. 
Title: Re: Multiple hosts on same domain
Post by: DanB35 on April 18, 2016, 09:29:00 PM
That's pretty obvious, and I feel silly for missing it.  How do I get mydomain.tld to resolve properly?
Title: Re: Multiple hosts on same domain
Post by: mmccarn on April 20, 2016, 12:09:30 PM
At a guess, I'd recommend:

* Don't set the 'domain' on the secondary to match the domain on the primary. set the 'domain' to 'smeserver.local' or 'sme-chat.mydomain.tld' to avoid local conflicts with www, mail, ftp, etc.

* configure DNS on sme-chat.mydomain.tld to use the main sme server as the 'corporate dns' server

* create 'sme-chat.mydomain.tld' as a host on the main sme server

* if you need external access to sme-chat either configure proxypass on the main sme to pass requests for sme-chat to the second server, or create firewall rules to pass that traffic directly to sme-chat.
Title: Re: Multiple hosts on same domain
Post by: DanB35 on April 20, 2016, 02:57:55 PM
That makes sense.  I've already done 2-4 on that list, but hadn't considered 1.  I'll give that a try.  Thanks for the pointer!
Title: Re: Multiple hosts on same domain
Post by: ecureuil on April 25, 2016, 05:36:44 PM
At a guess, I'd recommend:

* Don't set the 'domain' on the secondary to match the domain on the primary. set the 'domain' to 'smeserver.local' or 'sme-chat.mydomain.tld' to avoid local conflicts with www, mail, ftp, etc.

* configure DNS on sme-chat.mydomain.tld to use the main sme server as the 'corporate dns' server

* create 'sme-chat.mydomain.tld' as a host on the main sme server

* if you need external access to sme-chat either configure proxypass on the main sme to pass requests for sme-chat to the second server, or create firewall rules to pass that traffic directly to sme-chat.

How configure a proxypass

thank you
Title: Re: Multiple hosts on same domain
Post by: Stefano on April 25, 2016, 07:40:27 PM
Search for proxypass in the wiki
Title: Re: Multiple hosts on same domain
Post by: ecureuil on April 25, 2016, 08:11:10 PM
Search for proxypass in the wiki

yes
https://wiki.contribs.org/SME_Server:Documentation:ProxyPass
I don't understand

I tested  smeserver-webapps-common

=>
Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request

Reason: DNS lookup failure for:

anne