websphere application server behind ingress redirects to dns:port - kubernetes

I am trying to run websphere behind ingress.
I have successfully configured the ingress for it and I am able to access the console.
The ip on which I am able to access the console is
https://mydomain/ibm/console/logon.jsp
Note: I have a domain , for which I created a A record.
When I login into the console ,
I am redirected to
https://mydomain:9043/ibm/console/
This page does not exist.
If I explicitly run the URL https://dns/ibm/console/login.do?action=secure. My application works fine.
Can someone tell me where is the configuration needed so that it is not redirected to dns:port?
I have created all the config following the URL:
Problem configuring websphere application server behind ingress

The request is http://hostname/ibm/console/logon.jsp and it returns http://hostname:9080/ibm/console/logon.jsp
This is causing confusion and thus we are facing an issue.
The port which our was app uses is controlled by two properties:
trusthostheaderport = true
com.ibm.ws.webcontainer.extractHostHeaderPort = true
These can be created in the WAS Admin console under:
Servers > Server Types > WebSphere application servers > [server_name] > Web Container Settings > Web container > Additional Properties > Custom Properties
Setting both of these properties with a value of "true" should force WAS to use the front-end port (from the Host header) instead of the Webcontainer port.
Note: You need to restart the service after the change ( restart in case of docker containers)
Please find the documentation here.

Related

Making nextcloud work on a prefixed path (using docker and caddy)

I'm trying to setup my own instance of nextcloud on my server but I'm running into a problem as I want nextcloud to be available under https://example.com/cloud/.
Next cloud is running in a CoreOS virtual machine called let's say myvm.
So this is the way I setup my CaddyFile:
example.com {
gzip
proxy /cloud myvm:8080 {
transparent
without /cloud
}
}
I have other proxies that work fine for other services or VMs that are written similarily.
With this, and publishing port 8080 in my docker-compose file, I manage to connect to the nextcloud instance. But every time I go to example.com/cloud/ it will redirect me to example.com/apps/files/ instead of example.com/cloud/apps/files/.
If I enter this last url manually, I can access to nextcloud, but also the page doesn't load properly because all the contents cannot be loaded because they are not prompted with the prefix cloud/.
Is there a way to explain nextcloud about this prefix through the configuration of docker-compose file? (It's the only configuration I created, it works with just that and no extra work, I use one similar to the one available here (the apache one).)
Or maybe I can improve the CaddyFile config? (By the way, if I don't use the without option, it will just not work at all and return 404 when I go to the url).

WildFly Access control list behind proxy/load-balancer

I am using one Wildfly based application. I have deployed application inside docker and accessing it through AWS load-balancer. Also, I have enabled "proxy-address-forwarding=true" in standalone.xml with ip based filter for path as -
<expression-filter name="ipAccess" expression="path-prefix('/auth/admin') -> ip-access-control(default-allow=false, acl={'127.0.0.1/32 allow', '172.17.0.0/16 allow', '192.168.0.0/16 allow' })"/>
But whenever I am trying to access application, I am getting 403 Access Denied. Filtering works fine for me if I removed "proxy-address-forwading=true" from standalone.xml

Grafana datasources connection using proxy

How Grafana can be configured to connect to the data sources (for example Graphite) via proxy?
Grafana -> Proxy -> Graphite
When adding Graphite data source in Grafana there is an option to choose access with proxy (Proxy=Grafana backend will proxy the request) but there is no place in the configureation.ini to specify the IP of the proxy to be used for backend data transfer.
In the ini file there is location to specify "authentication proxy" for accessing the Grafana UI but can this be used for proxy between Grafana and Graphite?
[auth.proxy]
enabled = true
header_name = X-WEBAUTH-USER
header_property = username
auto_sign_up = true
Where the proxy details between Grafana and its data sources can be configured?
Thanks for the reply of AussieDan
I have added the environment variables :
set HTTP_PROXY="http://proxy_IP:proxy_port"
set HTTPS_PROXY="https://proxy_IP:proxy_port"
And started the Grafana in same command prompt .
When trying to save the Graphite data source in Grafana UI, it says in the log "proxy error: Service Unavailable". Telnet to the proxy on same port works fine so the port is open.
` 2016/12/13 15:55:05 http: proxy error: Service Unavailable ←[31mEROR←[0m[12-13|15:55:05] Request Completed ←[31mlogger←[0m=context ←[31muserId←[0m=1 ←[31morgId←[0m=1 ←[31muname←[0m=admin ←[31mmethod←[0m=GET ←[31mpath←[0m=/metrics/find ←[31mstatus←[0m=500 ←[31mremote_addr←[0m=IP ←[31mtime_ns←[0m=15ns ←[31msize←[0m=0 `
Is there anything additional that needs to be configured for proxy communication?
Grafana defines a new user named grafana with its own environment, as stated here under Start the server (init.d service) and Environment file sections.
The environment file on ubuntu is located in /etc/default/grafana-server
Paste your proxy environment variable definitions in this file as so:
https_proxy=http://<ip>:<port>/
http_proxy=http://<ip>:<port>/
no_proxy=localhost,127.0.0.0/8,::1,<other ip/networks to ignore>
Since the grafana backend is written in go, you can use the HTTP_PROXY="http://proxyIp:proxyPort" environment variable to specify a proxy for it to use for all outgoing requests.

How to configure Mongodb MMS to go via a Proxy?

How to I change the monitoring-agent.config to go out via proxy with authentication?
The change log states...
Monitoring Agent 2.3.1.89-1
Released 2014-07-08
Added support for HTTP proxy configuration in the agent configuration file.
But I can't see how to do this.
Following wdberkeley's link I can add this value to the monitoring-agent.config file.
httpProxy=http://"pxproxy01":3128
But this gives..
Failure getting conf. Op: Get Err: Proxy Authentication Required
Is there anyway to set the authentication user/password ?
Edit file:
C:\MMSData\Monitoring\monitoring-agent.config
Add line...
httpProxy=http://<insert_server_address>:<insert_port>
e.g.
httpProxy=http://PROXY01.server.com:3128
Then get the proxy control team, who ever they be, to exclude the following from requiring authentication.
https://mms.mongodb.com 80
https://mms.mongodb.com 443
This has worked for me. I now have the MMS Agent on Windows sending stat's to the MMS service.
Thanks to #wdberkeley for starting me off on this route.
wdberkeley, the page you linked to does not exist & the classic page PDF & HTTP versions state 'HTTP_PROXY' not 'httpproxy' (on OSx section & tar.gz section), section '6.6 Monitoring Agent Configuration' does state the correct property name 'httpproxy'.

How to change default start page of Glassfish?

Currently when I type in the URL of my webapp, say "http://abc.edu/mywebapp/", I am taken to the login page of my webapp. When I type "http://abc.edu/", I am taken to the GlassFish info page. How can I do it such that when I key in "http://abc.edu/", I will be taken to my login page and not the GlassFish info page?
Option 1: You can set one of your webapps as default. This can be done with the admin console:
Configuration --> Virtual Servers --> server
Then select your default web application from the drop-down menu. If your webserver port is 8080, you can start your application now by:
http://hostname:8080
instead of http://hostname:8080/webapp
Notice that "server" is the name of Glassfish's default virtual server. If you configured a different virtual server for your webapp you need to change it accordingly.
Furthermore regarding this source, there might be some problems with JDBCRealms.
Option 2: You could also deploy your default webapp to "/" instead of "/webapp" but I think the first option is more flexible.
You need to change your context root to "/" Edit the application.xml that is where the context root for the app is set. You might have to undeploy the default context root inorder to do that (that is what I do in JBoss, I undeploy ROOT.war).