ErrorDocument setup on TeamSite/apache

dharrels
edited July 16, 2021 in TeamSite #1
I know this should be really easy and I feel dumb for asking, but how do I setup 404 Error handling in a TeamSite 5.5.2 on Apache server? I modified httpd.conf with "ErrorDocument 404 /error.html" and still get a 404 error, but with an added 302 error as well.

Thanks!!

Comments

  • Which apache server is receiving/serving up the error? iw-webd or your customer webserver? The iwproxy sends requests not matching http://yourteamsiteserver/iw/... to the customer apache server. I was able to specify serving up a 404 error with the iw-webd apache by adding to the httpd.conf.template, followed by an iwreset -ui:

    ErrorDocument 404 /iw/error.html

    with the file error.html in iw-home/httpd/iw/ directory.

    But I am not certain that that is what you are wanting. You need to carefully determine where the content lives and which webserver will need to server the error page. The directive you mentioned should work for the customer apache but you need to look at the document root and may need to move your file accordingly.

    Any changes made to the iw-webd file may be modified with service packs or patches from interwoven, so it is not a good practice to customize.

    Gwen
  • You are correct, that is not what I am wanting. What I want is the ability to test 404 error functionality as it would be in production. I want the apache instance running on port 81 to catch the 404, send the ErrorDocument and have iwproxy display it, from the branch/area you are in.

    Thanks...
  • If you want your apache configuration to be the same as "in production" -- just use the same configuration directives!

    In this case, you could set up the ErrorDocument in your own apache installation, and leave iwwebd alone. If you are using Apache 1.3.X, the relevant web page is:

    http://httpd.apache.org/docs/mod/core.html#errordocument

    I don't think ErrorDocument will allow you to change the response code, though.
  • Thanks for your responses, but I don't think my point is getting through.

    I put in httpd.conf:
    ErrorDocument 404 /error.html

    I browse through a workarea and create a 404 situation. iwproxy takes the request, munges it, hands it off to Apache, gets back a response (404 Error) and sends it back to my browser.

    Since the directive states that a 404 error should display /error.html, it fails because Apache it looking for htdocs/error.html when in fact what I want loaded is:

    /iwmnt/default/main/branchname/WORKAREA/areaname/error.html

    Does this help clarify my question at all? It appears that I need some setting in iwproxy, but reading through docs and this site I can't seem to find that setting.
  • This is basically the same situation as when one wants to make SSIs get pulled out of the TS area instead of the docroot. Make sure mod_rewrite is available in your apache installation, and then add the line

    Include <iw-home>/etc/httpd/mod_iw_ts_rewrite_via_mod_rewrite.conf

    to the end of your httpd.conf
TeamSite Developer Resources

  • Docker Automation

  • LiveSite Content Services (LSCS) REST API

  • Single Page Application (SPA) Modules

  • TeamSite Add-ons

If you are interested in gaining full access to the content, you can register for a My Support account here.
image
OpenText CE Products
TeamSite
APIs