0

I have a fresh Ubuntu 16.04 server and a simple html website running with apache 2.
An SSL certificate is also installed. Apache2 is already configured to forward automatically to https.

Furthermore I have a java application running on Glassfish 4 under contextroot myApp. I can access it under http://mydomain.io:8080/myApp
How can I configure apache to forward all requests https://mydomain.io/myApp/ to Glassfish. I don't want to use mod_jk, just apache.
Thanks

UPDATE

In the mean time I tried with mod_rewrite this:

ProxyPass /myApp/ http://localhost:8080/myApp/
ProxyPassReverse /myApp/ http://localhost:8080/myApp/

in /etc/apache2/sites-enabled/000-default.conf but it's not working!

codyLine
  • 509
  • 2
  • 8
  • 26

1 Answers1

0

Finally I solved the problem by inserting following lines ProxyRequests Off ProxyPreserveHost On ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/
in the VirtualHost configuration file located in /etc/apache2/sites-available/.
Like suggested in this website.

codyLine
  • 509
  • 2
  • 8
  • 26