Welcome! Log In Create A New Profile

Advanced

How to block access to exchange ecp from external

Posted by verofei 
How to block access to exchange ecp from external
March 23, 2016 02:14PM
Hi,
I would like to know if anyone knows how i can block access to exchange /ecp from external networks.

I have tried the following conf

server {
listen 80;
server_name mail.example.com;
location ~ ^/(ecp) {
deny all;
proxy_pass http://mail.example.com;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}


If i do http://mail.example.com i get the nginx default page
If i do http://mail.example.com/ecp i get a http 403 error page which is fine.

If i do the location / { all works fine.

Thanx!!
Sorry, only registered users may post in this forum.

Click here to login

Online Users

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