Welcome! Log In Create A New Profile

Advanced

First time - reverse proxy on oracle linux

Posted by david121212 
First time - reverse proxy on oracle linux
March 25, 2020 08:19AM
Hello ,
as I understadn I can use nginx reverse proxy in order to give people access to my local network from the web.
so if my proxy IP is 85.159.4.4 and I want them to be able to enter to devices on 172.16.5/24 -- I can do this
first - is this true?

I setup nginx ,
added a simple link on the /usr/share/nginx/html/index.html
<a href="http://172.16.5.26">Local Device1<a>.</br>.</p>

from the server I have ping and can access to it
but when I connect to the server from the internet - I can't reach it .

what do I need to do in order to make this work?

Thanks ,
Re: First time - reverse proxy on oracle linux
March 25, 2020 08:31AM
I google and found this

server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /usr/share/nginx/html;

# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;

location /172.16.5.26/{
proxy_set_header Host $http_host$request_uri;
proxy_pass http://172.16.5.26:80/;
proxy_read_timeout 120s;
access_log on;
}
location / {
}


error_page 404 /404.html;
location = /40x.html {
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}


but now the nginx is not working at all - can'y load
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 63
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready