Welcome! Log In Create A New Profile

Advanced

Help required

Zeeshan Opel
August 19, 2019 02:56AM
Dear members,

need your help regarding below nginx configuration. I have below config on
my nginx server but I am unable to rewrite the link. Please help me.
worker_processes 1;

worker_rlimit_nofile 30000;
events {
worker_connections 1024;
}


http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name 192.168.17.53;#This is my nginx server
rewrite ^ 172.17.5.157/mailsvr/mail$ 172.17.5.157/mail
permanent;#trying to rewrite 172.17.5.157/mailsvr/mail to 172.17.5.157
/mail
client_max_body_size 100m;

location /{
proxy_pass http://172.17.5.157;

proxy_redirect off;
proxy_buffering off;
proxy_set_header X-Real-IP $192.168.17.53;
proxy_set_header X-Forwarded-For $172.17.5.157;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
#proxy_pass $authenticated;
proxy_read_timeout 240;
}#end location
}#end server

}#end http

--
Zeeshan Qaiser Opel
+92-301-8446630
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Help required

Zeeshan Opel August 19, 2019 02:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 121
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