I’m trying to redirect Apache Webserver to Tomcat 8 in Ubuntu. Both of them are working properly but I can’t redirect from port 80 in Apache to Tomcat in 8080. My apps work un http://localhost:8080/cmsand myapp. I followed this. I tried also AJP mod but it didn’t work. I used a2enmod: a2enmod proxyand a2enmod proxy_http to enable modules.

This is my apache2/sites-available/000-default.conf.

<VirtualHost *:80>
ProxyRequests off
ProxyPreserveHost on

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

ProxyPass         /myapp  http://localhost:8082/myapp
ProxyPassReverse  /myapp  http://localhost:8082/myapp

ProxyPass         /cms  http://localhost:8082/cms
ProxyPassReverse  /cms  http://localhost:8082/cms

</VirtualHost>

These are my servlet.xml connectors:

   <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    <Connector port="8082" proxyPort="80"/>
    <Connector port="8009" redirectPort="8443" protocol="AJP/1.3"/>

Using ProxyPass /cms http://localhost:8080/cms don’t work either.

Thanks in advance.