nginx禁止未绑定域名和IP访问443或80端口

因为多个域名绑定到了同一个服务器,意外发现未在nginx绑定的域名因ip指向至这台服务器,居然可以访问
于是搜索到以下解决方案

nginx serve static html for root and proxy everything else

use the error_page 404 to redirect the traffic

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×