2016-11-22 4 views
0

J'essaie de définir un proxy inverse de base pour accéder à mon instance kibana. Ici l'instance Kibana (travaillant directement par: 5601 sans aucun problème)Echec de la configuration du proxy apache et du reverse-proxy de Kibana 5.0

#server.basePath: "" 
server.basePath:"/kibana" 

Et mes affaires apache

<VirtualHost *:80> 
    Servername xxxx 
    ProxyPreserveHost On 
    ProxyRequests On 
    ProxyPass/http://localhost:5601 
    ProxyPassReverse/http://localhost:5601 
</VirtualHost> 

Le problème est que je reçois http://xxxx/

Erreur Proxy

Le serveur proxy a reçu une réponse non valide f à partir d'un serveur en amont. Le serveur proxy n'a pas pu gérer la demande GET/app/kibana.

Raison: échec de recherche DNS pour: localhost: 5601app

j'ai fait quelques test, mais rien ne semble fonctionner. Deuxième essai avec ProxyPass/http://localhost:5601/app/kibana ProxyPassReverse/http://localhost:5601/app/kibana

Cette fois-ci, il est préférable, mais pas encore OK http://xxxx je reçois un clin d'oeil où je peux voir « Kibana chargement » et juste après un grand message en rouge

Kibana ne s'est pas chargé correctement. Vérifiez la sortie du serveur pour plus d'informations .

Répondre

2

OK, c'était facile ... Le apache est conf (méfiez-vous des barres obliques)

<VirtualHost *:80> 
    Servername xxxx 
    ProxyPreserveHost On 
    ProxyRequests On 
    ProxyPass/http://localhost:5601/ 
    ProxyPassReverse/http://localhost:5601/ 
</VirtualHost> 

Et je laisse tout par défaut sur Kibana (pas base.path)

1

Essayez quelque chose comme ça

<VirtualHost *:8190> 
    Servername kibana 

    DirectoryIndex /app/kibana 

    ProxyPass /app/kibana http://kibana:5601/app/kibana 
    ProxyPassReverse /app/kibana http://kibana:5601/app/kibana 

    ProxyPass /app/timelion http://kibana:5601/app/timelion 
    ProxyPassReverse /app/timelion http://kibana:5601/app/timelion 

    ProxyPass /bundles http://kibana:5601/bundles 
    ProxyPassReverse /bundles http://kibana:5601/bundles 

    ProxyPass /elasticsearch http://kibana:5601/elasticsearch 
    ProxyPassReverse /elasticsearch http://kibana:5601/elasticsearch 

    ProxyPass /status http://kibana:5601/status 
    ProxyPassReverse /status http://kibana:/status 

    ProxyPass /api/status http://kibana:5601/api/status 
    ProxyPassReverse /api/status http://kibana:5601/api/status 

    ProxyPass /api/console http://kibana:5601/api/console 
    ProxyPassReverse /api/console http://kibana:5601/api/console 

    ProxyPass /api/timelion/run http://kibana:5601/api/timelion/run 
    ProxyPassReverse /api/timelion/run http://kibana:5601/api/timelion/run 

    ProxyPass /api/timelion/functions http://kibana:5601/api/timelion/functions 
    ProxyPassReverse /api/timelion/functions http://kibana:5601/api/timelion/functions 

    ProxyPass /api/ http://kibana:5601/api/ 
    ProxyPassReverse /api/ http://kibana:5601/api/ 

    ProxyPass /goto/ http://kibana:5601/goto/ 
    ProxyPassReverse /goto/ http://kibana:5601/goto/ 

    ProxyPass /shorten http://kibana:5601/shorten 
    ProxyPassReverse /shorten http://kibana:5601/shorten 

    ProxyPass /plugins/kibana/ http://kibana:5601/plugins/kibana/ 
    ProxyPassReverse /plugins/kibana/ http://kibana:5601/plugins/kibana/ 

    ProxyPass /plugins/timelion/ http://kibana:5601/plugins/timelion/ 
    ProxyPassReverse /plugins/timelion/ http://kibana:5601/plugins/timelion/ 

    ProxyPass /app/sense http://kibana:5601/app/sense 
    ProxyPassReverse /app/sense http://kibana:5601/app/sense 

    ProxyPass /ui/fonts/open_sans/ http://kibana:5601/ui/fonts/open_sans/ 
    ProxyPassReverse /ui/fonts/open_sans/ http://kibana:5601/ui/fonts/open_sans/ 

    ProxyPass /es_admin/ http://kibana:5601/es_admin/ 
    ProxyPassReverse /es_admin/ http://kibana:5601/es_admin/ 

    ErrorLog "logs/kibana-error.log" 

</VirtualHost> 

Kibana 4 était moins de la moitié de cette :)