Quantcast
Channel: User Sergey Ponomarev - Stack Overflow
Viewing all articles
Browse latest Browse all 67

Answer by Sergey Ponomarev for Block access with https ipaddress on nginx

$
0
0

You may try to add a regexp by Host that will drop IPs and require domains:

server {    listen 80;    # skip raw IP as host e.g. require at least one letter (same for Punycode)    if ( $http_host !~* ^(.*[a-zA-Z]+.*)$ ) {        return 403;    }}

Viewing all articles
Browse latest Browse all 67

Trending Articles



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