S
S
symnoob2019-02-06 20:01:31
Apache HTTP Server
symnoob, 2019-02-06 20:01:31

Port forwarding, how to implement - Apache Java Server?

Good afternoon,
I have one program written in Java.
The program is something like a Web Server. Returns data in JSON format when requested.
and responds to port 55965

, can I somehow start this business through Apache?

in principle, you can write a small php script that would access localhost: 55965 and transfer it all to port 80, but maybe there is a better solution?
the whole thing works on Ubuntu 18LTS

Thank you all very much!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Kirillov, 2019-02-07
@symnoob

Oh sure.
Use mod_proxy
For example:

<VirtualHost *:80>
 ProxyPreserveHost On
 ProxyPass / http://127.0.0.1:55965/
 ProxyPassReverse / http://127.0.0.1:55965/
</VirtualHost>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question