Nginx禁止IP直接访问空主机头并允许访问特定目录

location /phpmyadmin {
    allow all;
}
location / {
    return 444;
}