0

I'm trying to install and set up an Apache Knox API-Gateway in a CentOS docker container and launch it in a web browser.

To run the container:

docker run --name api -p 8443:8443 -it centos /bin/bash

Inside that, I download the Knox:

wget https://archive.apache.org/dist/knox/2.0.0/knox-2.0.0.tar.gz

Inside the knox-2.0.0 decompressed directory, I ran:

./bin/knoxcli.sh create-master

And I add to the conf/gateway-site.xml the following XML:

<gateway>
   <provider>
      <role>authentication</role>
      <name>ShiroProvider</name>
      <enabled>true</enabled>
      <param>
         <name>main.ldapRealm</name>
         <value>org.apache.shiro.realm.ldap.JndiLdapRealm</value>
      </param>
      <param>
         <name>main.ldapRealm.userDnTemplate</name>
         <value>uid={0},ou=people,dc=example,dc=com</value>
      </param>
      <param>
         <name>main.ldapRealm.contextFactory.url</name>
         <value>ldap://localhost:389</value>
      </param>
   </provider>
</gateway>

I've started the Apache Knox:

./bin/gateway.sh start

And tried to access it on http://localhost:8443/gateway/default/ but got "localhost sent an invalid response."

What am I missing?

Olaf Kock
  • 46,930
  • 8
  • 59
  • 90

0 Answers0