-1

How I can hide the port 8080 from the address bar? when I call my sub.domain.com I get nothing but when I call my sub.domain.com:8008 I get the application! I am using apache2 and jboss 7

Thanks

<virtualhost *:80>
ServerName sub.domain.com
ServerAlias sub.domain.com
<Location /myapp>
            Order deny,allow
            Allow from all
            Options -Indexes FollowSymLinks
            ProxyPass http://127.0.0.1:8080/myapp
            ProxyPassReverse http://127.0.0.1:8080/myapp
</Location>
DirectoryIndex index.html index.htm index.php index.asp index.aspx index.jsp index.jspa index.shtml index.shtm
</virtualhost>
  • Does http://sub.domain.com/myapp not work? – faker Jul 08 '14 at 11:03
  • Not completely clear on your question. Do you want `http://sub.domain.com:8008/` to not respond to requests and have `http://sub.domain.com/myapp` proxy to `localhost:8008`? Also, as an aside: You probably don't need that many `DirectoryIndex` values. – Belmin Fernandez Jul 08 '14 at 11:14
  • I want to call sub.domain.com then myapp appear on the browser not when I call sub.domain.com:8080 – user3764526 Jul 08 '14 at 11:58

1 Answers1

1

You could set up a redirect on that subdomain to the correct address, for eg. if you use PHP you cold go:

<?php
   header('Location: http://<youraddress>:<port>');
?>

but then that would actually change the address in the address bar, so if its a cosmetic thing for the URL its not the best option.