Hello All,
On my linux box, I only have ports 80 and 22 open to the public.
I have nginx listening on port 80.
Is there a way that I can forward public requests made to different ports using nginx.
For example,
I'd like the following requests from the internet:
xxx.xxx.xxx.xxx:8083
xxx.xxx.xxx.xxx:8086
xxx.xxx.xxx.xxx:8090
xxx.xxx.xxx.xxx:8099
to be forwarded to the same ports within my Linux box though port 80.
I was thinking of adding the following lines to my nginx.conf file:
server {
listen 8083
location = {
proxy_pass http://127.0.0.1:8083;
}
server {
listen 8086
location = {
proxy_pass http://127.0.0.1:8086;
}
server {
listen 8090
location = {
proxy_pass http://127.0.0.1:8090;
}
server {
listen 8090
location = {
proxy_pass http://127.0.0.1:8099
}
However, since only port 80 is open on my machine, would the above code be called?
Thanks in advance.
On my linux box, I only have ports 80 and 22 open to the public.
I have nginx listening on port 80.
Is there a way that I can forward public requests made to different ports using nginx.
For example,
I'd like the following requests from the internet:
xxx.xxx.xxx.xxx:8083
xxx.xxx.xxx.xxx:8086
xxx.xxx.xxx.xxx:8090
xxx.xxx.xxx.xxx:8099
to be forwarded to the same ports within my Linux box though port 80.
I was thinking of adding the following lines to my nginx.conf file:
server {
listen 8083
location = {
proxy_pass http://127.0.0.1:8083;
}
server {
listen 8086
location = {
proxy_pass http://127.0.0.1:8086;
}
server {
listen 8090
location = {
proxy_pass http://127.0.0.1:8090;
}
server {
listen 8090
location = {
proxy_pass http://127.0.0.1:8099
}
However, since only port 80 is open on my machine, would the above code be called?
Thanks in advance.