0

I have an AWS deployment where I have a web-server (serving a PHP-based website) and an application server (serving JSP/Tomcat based applications). The redirection from the webserver to the application server is made via AJP over port 8009. This is specified in workers.properties.

This works well when there is only one application server whose private IP is specified in the host directive of workers.properties.

This redirection fails the moment the application server is placed behind an ELB. The redirection from PHP to Tomcat fails. What I have tried so far:

  1. Specified the ELB endpoint in the workers.properties file.
  2. Changed all JkMount directives in the virtualhost.conf file to ProxyPass directives. The following is the change:
    JkMount /application* tomcat1
    to
    ProxyPass /application ajp://ELBDNSName:8009/application

This too does not work.

How do I get the redirection to work properly?

Sriram
  • 201
  • 1
  • 4
  • 8

1 Answers1

1

You are confusing things a lot:

  • This is not a redirection, it is a reverse proxy situation.
  • AJP is a protocol.

You probably created the ELB in HTTP mode, which means that it tries to talk HTTP both to the clients and the upstreams. Terribly fails since you told them both to talk AJP. Leaving the thing with ProxyPass and switching the ELB to TCP SHOULD make things work.

I highly recommend you to go on and start learning or hire an expert.

Florin Asăvoaie
  • 7,057
  • 23
  • 35