I did not get it right, but I had to play this configuration :

#ProxyPreserveHost On
<Location /graylog>
  ProxyPass http:// <http://localhost:10198/>localhost<http://localhost:10198/>
:9000/ <http://localhost:10198/>
  ProxyPassReverse http://
<http://localhost:10198/>localhost<http://localhost:10198/>
:9000/ <http://localhost:10198/>
#  ProxyPassReverse /
  ProxyHTMLEnable On
  ProxyHTMLExtended On
  ProxyHTMLMeta On
  ProxyHTMLURLMap / /graylog/
  ProxyHTMLURLMap http://
<http://localhost:10198/>localhost<http://localhost:10198/>
:9000/ <http://localhost:10198/> /graylog/
#  ProxyPassReverseCookieDomain localhost:9000
#  ProxyPassReverseCookiePath / /graylog/
</Location>

Your config adapt HTTP request ans réponses. Apache module Proxy_HTML adapt
HTML in web pages si hard links works and JS too.
That need for rewrite does not come from proxying, but from having several
applications behind a single server.
That makes us redirect External.com/graylog to internal.com/.
Graylog itself as an "empty" context root : "/", we expose : "/graylog".
Si graylog's link to /main.css must ne rewritten /graylog/main.css.
My configuration works well for http request/réponses, HTML, JavaScript,
but IT fails on links in flash (like for appDynamics, as an example )

Regards, Nicolas Fedou.
Le 2 mai 2014 11:56, "Егор Морозов" <[email protected]> a écrit :

> Welll, nginx has mod_sub which allows you to replace the symbols using
> regexp. I think something similar is available in Apache so you could try
> using this.
>
> On Thursday, May 1, 2014 9:54:11 PM UTC+3, Wiley Sanders wrote:
>>
>> I am trying to proxy graylog2 into an apache server with several apps.
>> The usual rules I would use in Apache,
>>
>> ProxyRequests Off
>> ProxyPass /graylog2/ http://localhost:9000/
>> ProxyPassReverse /graylog2/ http://localhost:9000/
>>
>> Don't work because a lot of the javascript seems to path to urls "hard
>> coded": looking for stuff in "/assets/", etc. I get partial page loads,
>> missing CSS, etc.
>>
>> It doesn't look like there's an easy way to do this - but if anyone has
>> gotten something like this to work, let us know.
>>
>> An easier workaround one can do (and that provides a modicum of access
>> control) is to just forward graylog's port via ssh. That does work, and is
>> very easy: "ssh -NL <some_local_port>:graylog2host:9000 graylog2host" or
>> something like that.
>>
>> Thanks -w
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "graylog2" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"graylog2" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to