Koozali.org: home of the SME Server

old URL breaks after new domain added

Offline mophilly

  • *
  • 384
  • +0/-0
    • Mophilly
old URL breaks after new domain added
« on: October 03, 2011, 06:14:39 PM »
SME 7.5.1, up to date.
custom app in /opt
www.mydomain.com is the main domain for the company. The domain name record in SME points to an iBay that is not the SME Primary Ibay.
www.NEWdomain.com is a new public domain name for another entity, and like the main domain, refers to another iBay that is not the SME Primary iBay.

For several years I have hosted a custom application accessed with with a URL, e.g. www.mydomain/appKey/<other stuff>. An Apache mod.so picks up the "appKey" and hands off to the custom app.

Over the weekend I added the new iBay, for the new domain, installed WordPress, and everything appears to be working fine except the faceless app. The old URL does not work. I noticed that if I used the URL "www.NEWdomain/appKey/<other stuff>" the custom app responded as expected.

What would account for the "change" in URL handling? Perhaps there is an order to the loading of the virtual host names I could adjust with a custom template?

I think I am not understanding something very basic about SME or Apache, so I wonder whether this question is acceptable in this forum. Please forgive me if it is not.

[EDIT 1] I should add that the old URL is implemented using a custom template fragment in the custom-templates tree for httpd.conf. Here is the code:

Quote
LoadModule appKey_module modules/mod_appKey.so

<Location /appKey>
    KeyServer 127.0.0.1 8086
    SetHandler appKey-handler
</Location>

[EDIT 2] I amended the rewrite rules in .htaccess, which set things right from an operational view. Gotta love rewrite rules.

Still, I was surprised that the new domain "took over" the location directive. I would like to know more, so if anyone has a link to share, I would be most grateful.
« Last Edit: October 04, 2011, 02:58:48 AM by Mophilly »
- Mark

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: old URL breaks after new domain added
« Reply #1 on: October 04, 2011, 03:42:26 AM »
If you decide to use a custom template, or a .htaccess file, you take on the responsibility of fixing any problems that arise. There is abundant apache configuration information on the 'net.

One hint that I have for you is that you don't need both. Just a custom template should be sufficent to express everything that you need.