Note that there are some explanatory texts on larger screens.

plurals
  1. PORemove tomcat port number in the http URL
    text
    copied!<p>I have a webapplication hosted on tomcat. I'm trying to achieve a URL redirection of my webappname. So, I'm using the vhosts config in apache of my xampp installation.</p> <blockquote> <p>My tools : Tomcat, XAMPP, APACHE</p> </blockquote> <p><strong>Changes I made :</strong></p> <pre><code>In /System32/drivers/etc/hosts 127.0.0.1 www.myapp.com </code></pre> <p><strong>Also, I requested for a domain name.</strong></p> <pre><code>nslookup myapp.com Server: xxx.xx.xxx.xxx Address: xxx.xx.xxx.xxx#53 myapp.com canonical name = blah-blah-myapp.com. Name: myapp.com Address: xxx.xx.xxx.xxx </code></pre> <p><strong>In tomcat server.xml :</strong></p> <pre><code> &lt;Connector className="org.apache.catalina.connector.http.HttpConnector" connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443" proxyName="www.myapp.com" proxyPort="80"/&gt; </code></pre> <p><strong>In httpd.conf :</strong></p> <pre><code>LoadModule proxy_module modules/mod_proxy.so #AddModule mod_proxy.c # Gave error when tried to follow the docs ProxyPass /MyAppPath http://localhost:8080/MyAppPath ProxyPassReverse /MyAppPath http://localhost:8080/MyAppPath </code></pre> <p><strong>In http-vhosts.conf :</strong></p> <pre><code>&lt;VirtualHost *:80&gt; ServerName myapp.com ServerAlias www.myapp.com ProxyRequests Off ProxyPreserveHost On &lt;Proxy *&gt; Order deny,allow Allow from all &lt;/Proxy&gt; ProxyPass /MyAppPath http://localhost:8080 ProxyPassReverse http://localhost:8080 </code></pre> <p></p> <p>By making these configurations, I achieved the functionality in my Macintosh machine. But, the problem is with windows server. I made the same changes in windows installation config files. It not skipping the PORT number. My app only works with the port number infront of the domain name. How can I make the <code>http request on port 80 to redirect to tomcat port 8080</code></p> <p>All I'm looking for is to implement something like www.myapp.com instead of localhost:8080/index.html. My app is running on port 8080. After the above config changes, i'm able to access the application with www.myapp.com:8080. I want to eliminate the 8080 from the url.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload