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