A
A
Alexey2017-02-14 12:56:26
Apache HTTP Server
Alexey, 2017-02-14 12:56:26

How to redirect the visitor to another server and port?

The organization has a web server (server 1) on SUSE Linux, which has a normal "external" address like example.ru. Inside the local network there is another server (server 2) on Debian, which performs its functions of controlling the hardware, but Apache is also running on it and there is a web-muzzle with data. On server 1, ports are forwarded in such a way that server 2 is visible "outside" as example.ru:5980, i.e. addressing server 1 on a non-standard port, we immediately get to server 2.
Is it possible to somehow configure redirection on server 1 so that server 2 also has a normal external address like example.ru/server2, i.e. it did not have to be accessed on the "left" port when entering from outside the local network.
The trouble is that too many administrators from our companion organizations block traffic on non-standard ports. And it is problematic to completely transfer web functionality from server 2 to server 1.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Chernykh, 2017-02-14
@WildHorn

it is possible
to put nginx frontend on server1, apache backend (maybe web content can be translated to nginx+php-fpm? Think about it)
and in nginx conf on server1
server {
server_name example.ru
listen 80;
root /home/example.ru/www;
index index.php index.html;
location /server2 {
proxy_pass http://server2:5980;
.....
}
......
that's basically it.
requests to example.ru/server2 will be proxied to server2

A
Axian Ltd., 2017-02-14
@AxianLTD

nginx or any other reverse proxy. You can configure Apache itself to do this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question