Mobile app version of vmapp.org
Login or Join
Harper822

: Redirect :80 to :8080/ui on Apache I need to redirect port :80 to :8080/ui. I know iptables lets you redirect :80 to :8080 but it doesn't accept the URL part, only the port. How should I

@Harper822

Posted in: #Apache #Httpd

I need to redirect port :80 to :8080/ui. I know iptables lets you redirect :80 to :8080 but it doesn't accept the URL part, only the port. How should I do it?

It is acceptable to change the URL to :8080/ui (URL changing is OK). I can't use Tomcat AJP because I use websockets which is not supported.

Apache proxying doesn't work with websockets so it is not an option.enter code here

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Harper822

1 Comments

Sorted by latest first Latest Oldest Best

 

@Eichhorn148

Is running a web server on port 80 (to send the redirect) acceptable? If not, it won’t work anyway.

I’ll go with Apache, since you already mention it in the tags. In your httpd.conf (or include file in sites or whatever), add the following line either to the top level configuration or the appropriate virtual host:

Redirect permanent / 1.2.3.4:8080/ui

This requires mod_alias to be installed and enabled, which it likely is by default anyway.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme