In addition to the default Apache on AWS EC2 Linux I have installed Tomcat 8 and deployed a webservice on it.
The current URL (which works) is http://example.com:8080/MyService/api/generatePath
I want to make this shorter with a subdomain api.mydomain.com, so that I can use this URL: http://api.example.com/generatePath.
This is what I have done on the
/etc/httpd/conf/httpd.conf, but it doesn't work:
<VirtualHost *:80> ServerName api.example.com ProxyRequests Off ProxyPreserveHost On <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / http://localhost:8080/MyService/api ProxyPassReverse / http://localhost:8080/MyService/api </VirtualHost>