J'ai besoin de démarrer deux services HTTP dans les mêmes instances sur le moteur de calcul google (Apache HTTP et Glassfish HTTP à la fois le port 80). J'ai déjà cherché la redirection de ports et l'ip, mais j'ai trouvé cela très confus. Quelqu'un at-il déjà eu besoin de ce type d'environnement? Pourriez-vous m'aider pas à pas?Deux services HTTP google compute engine
0
A
Répondre
0
Vous ne pouvez pas démarrer deux services sur le même port. Vous devrez rediriger la requête HTTP vers Tomcat. Pour y parvenir, vous devrez configurer votre Apache en tant que proxy inverse. Ici vous pouvez en lire plus à ce sujet [1].
Ceci est par exemple extrait de h la documentation Apache [2]:
# mod_proxy setup.
ProxyRequests Off
ProxyPass /webapps http://localhost:8080
ProxyPassReverse /webapps http://localhost:8080
<Location "/webapps">
# Configurations specific to this location. Add what you need.
# For instance, you can add mod_proxy_html directives to fix
# links in the HTML code. See link at end of this page about using
# mod_proxy_html.
# Allow access to this proxied URL location for everyone.
Order allow,deny
Allow from all
</Location>
Et ici [3], vous pouvez trouver un tutoriel étape par étape.
[1] https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html [2] https://wiki.apache.org/httpd/TomcatReverseProxy [3] https://rvdb.wordpress.com/2012/04/26/reverse-proxying-tomcat-webapps-behind-apache/