· Oct 25, 2018

CSP Gateway with Apache 2.4 on a remote computer

I'm trying to set up a  webserver (Apache 2.4 on Windows 10) for a CSP application on a Cache which is not running on the same Computer. 

My Problem is that in the csp-pages there is a declaration:

<link rel="stylesheet" type="text/css" href="/jbsscan/stylesheets/style.css"></link>
<script language="JavaScript" type="text/javascript" src="/jbsscan/javascript/javascriptScanner.js"></script>

When I access the csp pages the stylesheet and javascript file are missing, in the http trace of the csp gateway I see that there is a 404 for these files. So obviously the files are in the wrong place, but what is the correct place? I have tried the documentroot of the Apache and several others but nothing works, or is Cache trying to serve These files from the Server, but from where? Does somebody has experience with this Kind of Installation?  

Discussion (5)2
Log in or sign up to continue

Thanks, that was helpful but not yet the solution.

I removed in the Apache httpd.conf  js and css from the filetypes that are to be served from the server and got in a lot of other trouble because there were other files missing, so obviously Apache is trying to serve the js and css files from the server, which would be fine for me. This gets us to the point " it is served by Caché server and depends on settings of corresponding CSP application on Caché server side ". In the CSP application the location of the csp-files is set to


this would give as location for my files:



or is there an other setting which influences this.

Anyway, I put the files in this location. It didn't  help, the functions and styles of these two files are still missing. But something happened, the app got really, really slow.

Any ideas how I should proceed?

I need to state in advance that I haven't configured CSP apps and web servers for years - so I might be talking complete b******s - but if I remember correctly then in the CSP application configuration (System Management Portal) you define whether Caché serves files or not and if yes you specify a path. Paths in the csp code are relative to that, I believe. Check whether your csp apps are set up like that and if so, try to change the Serve files setting to 'No'. I think the consequence of that might be that the paths in your csp script will then be relative to the web server (possibly the directory where the csp gateway files are stored).

As I said, my memory might deceive me on the above, but in the absence of another, more authorative answer you might want to give this a try.

This is a absolute path to your webserver.  The URLs for given css and js files are:


The location depends on the definition of the DocumentRoot in your Apache httpd.conf. E.g. for following example

DocumentRoot "c:/Apache24/htdocs"

the files should be located in following folders


What also matter is how CSP Gateway in Apache is set. E.g. Caché Private Apache webserver is set to serve all files from Caché (directive CSP On), therefore it is served by Caché server and depends on settings of corresponding CSP application on Caché server side.