apache - Eliminate port number from ulr in tomcat -


for example url "http://example.com:8080", have eliminate 8080, have tried following code in server.xml file.

<connector port="8080" protocol="http/1.1"            connectiontimeout="20000"            redirectport="8443" /> 

replaced 8080 80 not working.

please me on issue

do want http://example.com url type in browser? either need component webserver on same host (as reverse-proxy) or tomcat has listen on port 80.

also, if redirect port, webserver has listen specific port, in case 8443, if want use that.

my recommendation in such case use minimal setup of apache reverse-proxy. besides standard modules you'd have enable mod_proxy, mod_proxy_http , if need ssl-handling mod_ssl.

then apache listens port 80 , proxies requests tomcat-backend on whatever-port tomcat should listen to. both can run on same server, no need additional vm/hardware.

you wouldn't need vhost on apache if use proxy functionality:

listen 80  proxypreservehost on proxypass / http://tomcat-url.com proxypassreverse / http://tomcat-url.com 

just make sure have mentioned modules active , code above in config.

let me know if you'd go route , have further questions :)


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -