Kibana5 behind reverse proxy iis - iis

How can I put my kibana5 behind a iis reverse proxy?
My url is myserver/kibana5/ which is redirect to localhost:5601 but when I try to access to my kibana trought myserver/kibana5/, the url is transform to myserver/app/kibana/.
Without kibana5, this can't work.
Someone have the solution?
Thank you.

Go to kibana.yml file is in kibana home --> config, and change the host to yours kibana server and delete the # char

Solved with the support :
-Modify basepath in kibana cfg file to /kibana5
-Modify IIS to accept invalid char like * and configure your reverse proxy
<system.web>
<httpRuntime requestPathInvalidCharacters="" requestValidationMode="2.0" />
</system.web>

Related

URL redirect in tomcat project

I am doing a web project using tomcat 7.0 . I want to redirect one page to another page.
Can I use .htaccess file in tomcat? If it can be used, how can I do?
Or can I config in web.xml ?
I'm appreciate for your helps.
Best regards,
Sokly
mod_rewrite is only an Apache module but you can use UrlRewriteFilter in Tomcat.
A rule like this should work for you in /WEB-INF/urlrewrite.xml:
<urlrewrite>
<rule>
<note>
The rule means that requests to /page-one/ will be redirected to /page-two/.
The url will be rewritten.
</note>
<from>/page-one/</from>
<to type="redirect">/page-two/</to>
</rule>
</urlrewrite>

Running Sonar behind Microsoft IIS with SSL enabled fails to redirect to https after successfull login

I have configured Sonar webserver to have all of the requests to go through Microsoft IIS server.
It was confirmed to work fine with requests via http protocol.
However, once the https was enabled, after successful login, Sonar webapp is trying to redirect to non-https url, causing it to timeout. If I then go and change the url to go to https, it shows as authenticated and continues to work as normal.
The same issue happens when you trying to logout - instead of redirecting to https page, it goes out to http.
What needs to be done to make Sonar post-login action to use the same protocol via which the login page was requested originally?
sonar.properties has:
sonar.web.host: 127.0.0.1
sonar.web.port: 9000
sonar.web.context: /sonar
IIS plugin has:
<VirtualHostGroup Name="default_host">
<VirtualHost Name="*:80"/>
<VirtualHost Name="*:9443"/>
<VirtualHost Name="*:443"/>
<VirtualHost Name="*:9000"/>
</VirtualHostGroup>
<ServerGroup Name="sonar_group">
<Server Name="sonar_server">
<Transport Hostname="127.0.0.1" Port="9000" Protocol="http"/>
</Server>
</ServerGroup>
<UriGroup Name="sonar_host_URIs">
<Uri Name="/sonar*"/>
</UriGroup>
<Route ServerGroup="sonar_group" UriGroup="sonar_host_URIs" VirtualHostGroup="default_host"/>
Thanks.
In the web UI (while logged in as an admin user), go to Settings -> General and make sure the URL listed under Server Base URL starts with "https". This can also be set in the server's sonar.properties file using sonar.core.serverBaseURL
This is a well-known issue with the Ruby stack, and requires tweaking the web-server config -- not that of Sonar. On Apache you'd have to do the following, Im sure the pointers in the ticket will also lead you to a solution for IIS:
RequestHeader set X_FORWARDED_PROTO "https"

How can I use an own asp page as 404 error page on a Windows 7 pro IIS 7.5 local installation

I have the following configuration:
Running Windows 7 Pro
Running local IIS 7.5 ( for web development purposes )
Edited hosts file to be able to use http://www.sitestepper.dev
Site build in subfolder of the inetpub/wwwroot/staplijst
Site can be viewed using http://www.sitestepper.dev/staplijst/whatever-page.htm
I have an http://www.sitestepper.dev/p.asp page I would like to call when an unknown page is requested. This technique works fine on the deployed version of this web site (deployed on an Windows 2003 server running IIS 6 - not sure about the 7 but it is the version deployed with Windows 2003 server).
I tried ( in the Edit Custom Error Dialog ) :
Execute a URL on this site: with value /staplijst/p.asp
and
Respond with a 302 redirect: with value http://www.sitestepper.dev/staplijst/p.asp
I tried this in the properties of the 'Default Web Site' , and I tried this at the staplijst level.
Even tried it with values without the /staplijst.
I restarted the default web site after each change. And even stopped/started the Web service.
But nothing seems to work, I keep getting the 'Server Error In Application "DEFAULT WEB SITE"' , HTTP Error 404.0 error.
What am I missing here - probably something obvious, but I don't see it ?
I just configured the following to reproduce your setup:
In the web.config file:
<configuration>
<system.webServer>
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404"
prefixLanguageFilePath=""
path="/p.asp"
responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>
</configuration>
In the root of the site I have a simple script called p.asp that does a Response.Write "Hello World".
If I browse to a page that doesn't exist p.asp is redirected to and I see "Hello World".
If I use the following in my web.config:
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404"
prefixLanguageFilePath=""
path="http://www.sitestepper.dev/p.asp"
responseMode="Redirect" />
</httpErrors>
This redirects as expected to p.asp and again I see "Hello World".
The only thing I can think that is wrong is that you say that p.asp lives in the root of the site: http://www.sitestepper.dev/p.asp but the ExecuteURL and Redirect response mode paths include /staplijst in the path.
To answer my own question: I needed to set the Error response to Custom error pages in the Edit feature settings... of the relevant site for this to work. It was set to 'Detailed errors for local requests and custom error pages for remote requests'.
I never had to do this in previous version of IIS, but maybe in those versions this was implied. Or maybe the host setting www.sitestepper.dev is causing the pages always to behave as local requests - anyway this has changed in IIS 7.5 I'm sure.
I searched for this solution without seeing the answer of 'Kev'. As a rule I tend not to edit config files directly if a solution can be found using the presented user interface panels.
I will accept his response as solution though.
.

How to set proxy settings for IIS processes?

I have internet connection via http proxy, and some of my web applications at localhost need to access internet. Where can i set up proxy settings for them?
All I needed was to set system.net in web.config
<system.net>
<defaultProxy>
<proxy
proxyaddress="http://10.0.2.231:42"
bypassonlocal="true"
/>
</defaultProxy>
</system.net>
See: Element (Network Settings).

Can Intelligencia.UrlRewriter be made to work in IIS7?

We've inherited an application that uses the Intelligencia.UrlRewriter module. Our environment though is IIS7. We've already set our site to run in the classic asp.net application pool (which aparantly works for a lot of these kinds of problems). However we're still not seeing the URLs in our app be rewritten.
Has anyone run into this?
You need to define the config on the system.webServer element, like:
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<add name="UrlRewriter"
type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter" />
</modules>
</system.webServer>
You can keep both config. What you probably have now is:
<httpModules>
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter" />
</httpModules>
Check the section "Migrating ASP.NET Applications to IIS 7.0 Integrated mod" on http://learn.iis.net/page.aspx/243/aspnet-integration-with-iis7/
ps. I have been using it with no trouble at all, as long as that config is in.
Update 1: Also check http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx, particularly "Approach 3: Using an HttpModule to Perform Extension-Less URL Rewriting with IIS7", since the config I added has the extension-less config.
Yes I had the exact same problem with Intelligencia.UrlRewriter module, running under Win Vista & IIS7, however switching to the classic asp.net app pool did fix the problem. Are you running the app in a new virtual directory? That can sometimes mess with the root path to the application which could make a difference to the rules in the web.config
I have spotted the same problem, after few tries I found out that changing asp mode to integrated pipeline helped.
Don't forget to add the following lines in the system.webServer section of your web.config file if you are using IIS7
<system.webServer>
<modules runAllManagedModulesForAllRequests=”true”>
<add name=”UrlRewriter” type=”Intelligencia.UrlRewriter.RewriterHttpModule” />
</modules>
<validation validateIntegratedModeConfiguration=”false” />
</system.webServer>
As in
http://frozengraphics.wordpress.com/2009/12/06/intelligencia-urlrewriter-and-iis7/

Resources