Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: kruhm on August 16, 2011, 12:26:32 AM

Title: Disallow Unconfigured Domains to Primary Domain
Post by: kruhm on August 16, 2011, 12:26:32 AM
Hi Everyone,

Currently the Primary Domain goes to the Primary Ibay. The issue is that if an outside domain is pointed to the server, it ends up in Primary Ibay as well. This is expected but not the desired result.

Is there a way to change Primary Domain to go to another Ibay so that it forces outside domains not configured on the server to end up in the Primary Ibay?

Hope that makes sense.

Thanks in advance,
Title: Re: Disallow Unconfigured Domains to Primary Domain
Post by: jester on August 17, 2011, 08:32:02 PM
I can't quite grasp what you mean, but if you want to direct the Primary domain to a different ibay:

Code: [Select]
db domains setprop <primarydomain> Content <ibay name>
signal-event domain-modify

You might also be able to detect the domain name someone used by means of java-script or CGI, eg: http://www.irt.org/script/352.htm

HTH.
Title: Re: Disallow Unconfigured Domains to Primary Domain
Post by: kruhm on August 17, 2011, 09:22:16 PM
Hi Jester,

Thanks for your help, I really appreciate your efforts.

I've changed the Primary Domain to another Ibay (not the Primary Ibay) but the IP address of the server (http://11.22.33.44) and unconfigured domains (domains not in the Server DB [db domains show]) are following the Primary Domain to the new Ibay. They are not going to the Primary Ibay like I had hoped.

Thanks,
Title: Re: Disallow Unconfigured Domains to Primary Domain
Post by: dimvin on August 18, 2011, 06:33:53 AM
you just add the domain name to the domains panel and specify the ibay for that domain then all other content will still go to original Primary ibay and your 'domain" will be the only one redirected to the other ibay.
Title: Re: Disallow Unconfigured Domains to Primary Domain
Post by: mmccarn on August 18, 2011, 02:30:34 PM
...or re-examine your idea of 'Primary'.

If you don't want your default domain to be the content of the 'Primary' domain, change the default domain name of the SME to something else and create a single domain in the domains panel with your current 'Primary' domain name... then re-direct that domain to the ibay you want it to go to.

That is, if your current primary domain is 'mysmeserver.org':
- set the SME default domain name to 'someotherdomain.local'
- create 'mysmeserver.org' in the domains panel, using your desired ibay for content.
Title: Re: Disallow Unconfigured Domains to Primary Domain
Post by: kruhm on August 18, 2011, 02:40:17 PM
...or re-examine your idea of 'Primary'...

That is, if your current primary domain is 'mysmeserver.org':
- set the SME default domain name to 'someotherdomain.local'
- create 'mysmeserver.org' in the domains panel, using your desired ibay for content.


That's probably the best way to go.

Thanks,
Title: Re: Disallow Unconfigured Domains to Primary Domain
Post by: CharlieBrady on August 18, 2011, 02:41:48 PM
Currently the Primary Domain goes to the Primary Ibay. The issue is that if an outside domain is pointed to the server, it ends up in Primary Ibay as well. This is expected but not the desired result.

I'm not sure why you care, since your content is public anyway, but if you want this behaviour (404 returned for unconfigured domain), you will need to use custom templates for httpd.conf.
Title: Re: Disallow Unconfigured Domains to Primary Domain
Post by: kruhm on August 20, 2011, 02:29:17 PM
I'm not sure why you care, since your content is public anyway, but if you want this behaviour (404 returned for unconfigured domain), you will need to use custom templates for httpd.conf.

Because this leads to duplicate results in search engines. So doing a search for information that should only lead to the PrimaryDomain.tld pulls up  a bunch-of-domains.tld with the exact same content.

Since the domains are outside of my control, I can't stop them from directing their domain to the server IP.

I hope this clarifies the issue. Thanks for responding. I truly appreciate your direction.

Regards,
Title: Re: Disallow Unconfigured Domains to Primary Domain
Post by: janet on August 21, 2011, 04:03:41 AM
kruhm

Quote
Since the domains are outside of my control, I can't stop them from directing their domain to the server IP.

You could use ProxyPass to redirect http requests to "wherever", obviously on a one by one domain basis as you become aware of them.
http://wiki.contribs.org/SME_Server:Documentation:FAQ#Proxy_Pass