Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

How to block access to exchange ecp from external

$
0
0
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!!

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>