Tagged: openig
This topic has 4 replies, 2 voices, and was last updated 5 years, 8 months ago by Joachim Andres.
-
AuthorPosts
-
November 16, 2016 at 8:07 pm #14320
Kabi Patt
ParticipantHi ,
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”
}Thanks
Kabi-Kabi
November 16, 2016 at 8:50 pm #14322Joachim Andres
ParticipantHi 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.
Best,
JoachimNovember 16, 2016 at 9:19 pm #14324Kabi Patt
ParticipantThanks 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.
KabiNovember 17, 2016 at 12:56 am #14326Kabi Patt
ParticipantI 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.
November 17, 2016 at 10:27 am #14328Joachim Andres
ParticipantGlad 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.Cheers,
Joachim -
AuthorPosts
You must be logged in to reply to this topic.