Special Configuration Required for Webgateway/git-source-control?
Hi there,
I'm attempting to use the newest version of git-web-ui now that we've also updated to 2024.1.2. I'm having an issue though where I'm getting a 404 when launching the web gui from the Source Control menu in a production. If I look in the nginx logs I see the following:
2024/11/19 22:00:47 [error] 16#0: *237 open() "/opt/nginx/html/isc/studio/usertemplates/gitsourcecontrol/webuidriver.csp/CUSTRUSH/CUSTRUSHPKG.FoundationProduction.CLS" failed (2: No such file or directory), client: 172.18.0.1, server: localhost, request: "GET /isc/studio/usertemplates/gitsourcecontrol/webuidriver.csp/CUSTRUSH/CUSTRUSHPKG.FoundationProduction.CLS?CSPSHARE=1&Project=&Document=localhost%3A9092%2FCUSTRUSH%2FCUSTRUSHPKG.FoundationProduction.CLS&Namespace=CUSTRUSH&User=_SYSTEM&CSPCHD=003000010000NxIbs1CgxCPtuWk_mjSx$SMbYM89ukHTqebjji HTTP/1.1", host: "localhost:9092", referrer: "http://localhost:9092/csp/healthshare/custrush/EnsPortal.Dialog.SourceC…"
I'm wondering if there's some setup in nginx or CSP.conf that I"m missing here or if anyone has run into anything similar?
-Vic
Comments
This looks like it's trying to serve a file from the filesystem for a URL that should be handled by CSP. Are you using a limited set of CSPFileTypes?
I have zero nginx experience, but based on the web server / nginx configuration docs you probably need something like:
location /isc/studio/usertemplates {
CSP on;
}This was part of the problem. I'm still working through this however I did find I had to do a few more things:
1.) Update the volume mappings on my docker-compose.yml to make the source control files available to my webgateway container. This wasn't necessary before because we weren't using the reverse proxy to access these pages.
2.) I had to update the rewrite rule like you suggested, however with some additional rules. I needed it to not treat anything past .csp as part of the path so I ended up doing this for now. Im still running into issues, however. I may need to add multiple lines.
I'm getting a generic 500 now. Going to keep playing with it to see if I can't get it to work as expected and look through ISCLOG
location ~ ^/isc/studio/usertemplates/gitsourcecontrol/webuidriver\.csp(.*)$ {
CSP on;
CSPNSD_pass 127.0.0.1:7038;
CSPNSD_response_headers_maxsize 8k;
CSPNSD_connect_timeout 300s;
CSPNSD_send_timeout 300s;
CSPNSD_read_timeout 300s;
proxy_pass http://localhost;
proxy_http_version 1.1;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "upgrade";
# try_files $uri $uri/ /isc/studio/usertemplates/gitsourcecontrol/webuidriver.csp$1;
}
If i simplify to:
location /isc/studio/usertemplates {
CSP on;
CSPNSD_pass 127.0.0.1:7038;
}I get the same message as in the screenshot below and the logs all show 200 so maybe I can KISS and use what you suggested but it still seems like I'm having some difficulty on the back end:
2024-11-26 10:27:20 172.18.0.1 - - [26/Nov/2024:18:27:20 +0000] "POST /csp/healthshare/custrush/%25CSP.Broker.cls HTTP/1.1" 200 713 "http://localhost:9092/csp/healthshare/custrush/EnsPortal.ProductionConfig.zen?$NAMESPACE=CUSTRUSH&$NAMESPACE=CUSTRUSH&" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
2024-11-26 10:27:20 172.18.0.1 - - [26/Nov/2024:18:27:20 +0000] "POST /csp/healthshare/custrush/%25CSP.Broker.cls HTTP/1.1" 200 379 "http://localhost:9092/csp/healthshare/custrush/EnsPortal.ProductionConfig.zen?$NAMESPACE=CUSTRUSH&$NAMESPACE=CUSTRUSH&" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
2024-11-26 10:27:20 172.18.0.1 - - [26/Nov/2024:18:27:20 +0000] "POST /csp/healthshare/custrush/%25CSP.Broker.cls HTTP/1.1" 200 363 "http://localhost:9092/csp/healthshare/custrush/EnsPortal.ProductionConfig.zen?$NAMESPACE=CUSTRUSH&$NAMESPACE=CUSTRUSH&" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
2024-11-26 10:27:20 172.18.0.1 - - [26/Nov/2024:18:27:20 +0000] "POST /csp/healthshare/custrush/%25CSP.Broker.cls HTTP/1.1" 200 713 "http://localhost:9092/csp/healthshare/custrush/EnsPortal.ProductionConfig.zen?$NAMESPACE=CUSTRUSH&$NAMESPACE=CUSTRUSH&" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
2024-11-26 10:27:23 172.18.0.1 - - [26/Nov/2024:18:27:23 +0000] "POST /csp/healthshare/custrush/%25CSP.Broker.cls HTTP/1.1" 200 380 "http://localhost:9092/csp/healthshare/custrush/EnsPortal.ProductionConfig.zen?$NAMESPACE=CUSTRUSH&$NAMESPACE=CUSTRUSH&" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
2024-11-26 10:27:23 172.18.0.1 - - [26/Nov/2024:18:27:23 +0000] "POST /csp/healthshare/custrush/%25CSP.Broker.cls HTTP/1.1" 200 380 "http://localhost:9092/csp/healthshare/custrush/EnsPortal.ProductionConfig.zen?$NAMESPACE=CUSTRUSH&$NAMESPACE=CUSTRUSH&" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
2024-11-26 10:27:23 172.18.0.1 - - [26/Nov/2024:18:27:23 +0000] "POST /csp/healthshare/custrush/%25CSP.Broker.cls HTTP/1.1" 200 591 "http://localhost:9092/csp/healthshare/custrush/EnsPortal.ProductionConfig.zen?$NAMESPACE=CUSTRUSH&$NAMESPACE=CUSTRUSH&" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
2024-11-26 10:27:23 172.18.0.1 - - [26/Nov/2024:18:27:23 +0000] "GET /csp/healthshare/custrush/EnsPortal.Dialog.SourceControlManager.zen?$ZEN_POPUP=1&TARGET=%2Fisc%2Fstudio%2Fusertemplates%2Fgitsourcecontrol%2Fwebuidriver.csp%2FCUSTRUSH%2FCUSTRUSHPKG.FoundationProduction.CLS%3FCSPSHARE%3D1%26CSPCHD%3D000000010000NxIbs1CgxCJOtVsUUrplExuBS4wQsqBKgt0G1l%26Project%3D%26Document%3Dlocalhost%253A9092%252FCUSTRUSH%252FCUSTRUSHPKG.FoundationProduction.CLS%26Namespace%3DCUSTRUSH%26User%3D_SYSTEM%26 HTTP/1.1" 200 15250 "http://localhost:9092/csp/healthshare/custrush/EnsPortal.ProductionConfig.zen?$NAMESPACE=CUSTRUSH&$NAMESPACE=CUSTRUSH&" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
2024-11-26 10:27:24 172.18.0.1 - - [26/Nov/2024:18:27:24 +0000] "POST /csp/healthshare/custrush/%25CSP.Broker.cls HTTP/1.1" 200 385 "http://localhost:9092/csp/healthshare/custrush/EnsPortal.ProductionConfig.zen?$NAMESPACE=CUSTRUSH&$NAMESPACE=CUSTRUSH&" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
2024-11-26 10:27:24 172.18.0.1 - - [26/Nov/2024:18:27:24 +0000] "POST /csp/healthshare/custrush/%25CSP.Broker.cls HTTP/1.1" 200 363 "http://localhost:9092/csp/healthshare/custrush/EnsPortal.ProductionConfig.zen?$NAMESPACE=CUSTRUSH&$NAMESPACE=CUSTRUSH&" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
2024-11-26 10:27:24 172.18.0.1 - - [26/Nov/2024:18:27:24 +0000] "POST /csp/healthshare/custrush/%25CSP.Broker.cls HTTP/1.1" 200 379 "http://localhost:9092/csp/healthshare/custrush/EnsPortal.ProductionConfig.zen?$NAMESPACE=CUSTRUSH&$NAMESPACE=CUSTRUSH&" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
2024-11-26 10:27:24 172.18.0.1 - - [26/Nov/2024:18:27:24 +0000] "POST /csp/healthshare/custrush/%25CSP.Broker.cls HTTP/1.1" 200 363 "http://localhost:9092/csp/healthshare/custrush/EnsPortal.ProductionConfig.zen?$NAMESPACE=CUSTRUSH&$NAMESPACE=CUSTRUSH&" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
2024-11-26 10:27:26 172.18.0.1 - - [26/Nov/2024:18:27:25 +0000] "GET /isc/studio/usertemplates/gitsourcecontrol/webuidriver.csp/CUSTRUSH/CUSTRUSHPKG.FoundationProduction.CLS?CSPSHARE=1&Project=&Document=localhost%3A9092%2FCUSTRUSH%2FCUSTRUSHPKG.FoundationProduction.CLS&Namespace=CUSTRUSH&User=_SYSTEM&CSPCHD=000000010000NxIbs1CgxCJOtVsUUrplExuBS4wQsqBKgt0G1l HTTP/1.1" 200 23 "http://localhost:9092/csp/healthshare/custrush/EnsPortal.Dialog.SourceControlManager.zen?$ZEN_POPUP=1&TARGET=%2Fisc%2Fstudio%2Fusertemplates%2Fgitsourcecontrol%2Fwebuidriver.csp%2FCUSTRUSH%2FCUSTRUSHPKG.FoundationProduction.CLS%3FCSPSHARE%3D1%26CSPCHD%3D000000010000NxIbs1CgxCJOtVsUUrplExuBS4wQsqBKgt0G1l%26Project%3D%26Document%3Dlocalhost%253A9092%252FCUSTRUSH%252FCUSTRUSHPKG.FoundationProduction.CLS%26Namespace%3DCUSTRUSH%26User%3D_SYSTEM%26" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"I popped in some debug points in webuidriver.csp and it looks like the url is still geting stripped post .csp.
@Timothy Leavitt
I was wondering if we know if this works with apache out of the box?
CUSTRUSH>zw ^XVMC
^XVMC("base")="/isc/studio/usertemplates/gitsourcecontrol/webuidriver.csp///"
^XVMC("handled")=0
^XVMC("namepace")=""
^XVMC("pagePath")=""
^XVMC("url")=""
I definitely haven't seen issues like this with Apache, and the trailing "///" in ^XVMC("base") is definitely suspicious. It's very possible that the "clever" approach of having a .csp page serve things under further URL segments doesn't work nicely on nginx.