sheepkiller / kafka-manager-docker

Kafka Manager Dockerfile
Apache License 2.0
247 stars 206 forks source link

THe image isn't working when deployed behind reverse proxy using subpath #21

Open marcofranssen opened 7 years ago

marcofranssen commented 7 years ago

When deployed using subpath the image isn't working as the urls and js in the index.html are absolute.

So what I did is a kubernetes deployment with a ingress controller which basically creates a nginx reverse proxy on a subpath.

E.g. http://development.myenvironment.com/kafka-manager/

Failed to load resource: the server responded with a status of 404 (Not Found)
/vassets/stylesheets/2b56540dba204490b0a8b01818b05991-index.min.css Failed to load resource: the server responded with a status of 404 (Not Found)
bootstrap.min.css Failed to load resource: the server responded with a status of 404 (Not Found)
c7d17af297af222b85192c2df48b8390-chartist.min.js Failed to load resource: the server responded with a status of 404 (Not Found)
/vassets/chartist/stylesheets/0dd8d6c6dca261528d9be38904d656d3-chartist.min.css Failed to load resource: the server responded with a status of 404 (Not Found)
jquery.min.js Failed to load resource: the server responded with a status of 404 (Not Found)
/vassets/chartist/stylesheets/0dd8d6c6dca261528d9be38904d656d3-chartist.min.css Failed to load resource: the server responded with a status of 404 (Not Found)
/vassets/dataTables/stylesheets/49765a39721f9ac7365f6a01962c52ef-dataTables.bootstrap.css Failed to load resource: the server responded with a status of 404 (Not Found)
/vassets/stylesheets/2b56540dba204490b0a8b01818b05991-index.min.css Failed to load resource: the server responded with a status of 404 (Not Found)
c7d17af297af222b85192c2df48b8390-chartist.min.js Failed to load resource: the server responded with a status of 404 (Not Found)
bootstrap.min.js Failed to load resource: the server responded with a status of 404 (Not Found)
280ff6aaaba888ccb486e669fd200b8e-jquery.dataTables.min.js Failed to load resource: the server responded with a status of 404 (Not Found)
8e519890a2e2499da2b753c65a5dc27c-dataTables.bootstrap.js Failed to load resource: the server responded with a status of 404 (Not Found)
2af62f58ee2baf495c9b3a9a1c30ce03-favicon.png Failed to load resource: the server responded with a status of 404 (Not Found)
jquery.min.js Failed to load resource: the server responded with a status of 404 (Not Found)
bootstrap.min.js Failed to load resource: the server responded with a status of 404 (Not Found)
280ff6aaaba888ccb486e669fd200b8e-jquery.dataTables.min.js Failed to load resource: the server responded with a status of 404 (Not Found)
8e519890a2e2499da2b753c65a5dc27c-dataTables.bootstrap.js Failed to load resource: the server responded with a status of 404 (Not Found)
bootstrap.min.css Failed to load resource: the server responded with a status of 404 (Not Found)
49765a39721f9ac7365f6a01962c52ef-dataTables.bootstrap.css Failed to load resource: the server responded with a status of 404 (Not Found)
2b56540dba204490b0a8b01818b05991-index.min.css Failed to load resource: the server responded with a status of 404 (Not Found)
0dd8d6c6dca261528d9be38904d656d3-chartist.min.css Failed to load resource: the server responded with a status of 404 (Not Found)

Is there a way to configure the image to run in a subpath of the url.

kstobbel commented 7 years ago

The thing I did is changing the property play.http.context to your sub path in the file /kafka-manager-<your_version>/conf/application.conf.