This topic has 4 replies, 2 voices, and was last updated 5 years, 8 months ago by Joachim Andres.

  • Author
  • #14320
     Kabi Patt

    Hi ,

    I am new to Open IG. Trying to use OpenIG as a proxy to start with.

    I have a sample app http://box1.abc.com/app1 running in box and I wanted to access it thru http://openig.abc.com/app1 (this is the box2 for openIG) . I followed the instruction mentioned section 2.4 in https://backstage.forgerock.com/docs/openig/4/gateway-guide/chap-quickstart#quickstart-config . I am getting this error because of a 404 :-

    { “error”: “Something gone wrong, please contact your system administrator.”}

    (1) I am not sure, if the tomcat is reading the json file , as I do not see the debug message in catalinia.out. I placed the .openig directory in TOMCAT_HOME.

    (2) There is config.json file and many other json files in “routes” directory. What is the difference ? Anyway, My current config.json looks like this :-

    handler”: {
    “type”: “Router”,
    “audit”: “global”,
    “baseURI”: “http://box1.abc.com/”,
    “capture”: “all”
    “condition”: “${request.uri.path == ‘/cabo’}”

    (3) and my 99-default.json ]looks like this :-
    “handler”: “ClientHandler”



     Joachim Andres

    Hi Kabi,

    The condition should be something like /app1 I suppose (and not /cabo) :

    “condition”: “${request.uri.path == ‘/app1’}”

    You should check the route-system.log and the route-<appname>.log files. Those are located in the ${OPENIG_BASE}/logs directory.


     Kabi Patt

    Thanks Joachim for quick reply. Yes that condition should be “/app1”.

    (1) What is the difference between config.json and route JSON file in “routes” directory ?
    (2) Can I put the above said configuration in 01-app1-route.json file with no config.json file ?
    (3) my config.json file has following entries, which suppose to show the log in catalina.out:-

    “name”: “LogSink”,
    “type”: “ConsoleLogSink”,
    “config”: {
    “level”: “DEBUG”

    And I do not see the log in the catalina.out.

    Thanks in advance.

     Kabi Patt

    I found my mistake. I had kept the .openig file in $TOMCAT_HOME folder instead of $HOME (/root in my case) directory. Once I transferred the .openif directory to $HOME, rest started working as expected. I also moved the app1 specific routing syntax from config.json to routes/01-app-routes.json file for clean separation. I guess config.json meant for global level setting like logs file only. Correct me if I am wrong.

     Joachim Andres

    Glad it works. Note that you can set the base directory via the OPENIG_BASE environment variable.
    You are correct on config.json vs routes configuration. It is more practical to have routes in separate files.


Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

©2022 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?