Page 1 of 1

Apache + nginx how can i configure restrictions by domain

Posted: Mon Apr 06, 2015 11:16 pm
by nematzu
Hello.

Im new to VestaCP, and im loving it.

But i havin an issue, how can I make my webserver responds only to the domains registered in Vesta (Web tab) ?

Any domain that is targeted to the IP of my vesta server is opening my main website, i would like to restrict the webserver just the domains that I have registered.

thanks.

Re: Apache + nginx how can i configure restrictions by domai

Posted: Tue Apr 07, 2015 11:23 am
by skurudo
It's link bombing or You can use default.domain for it or reject on first place:

Something like this:

Code: Select all

server {
    return 404;
}

server {
    server_name domain_1;
    [...]
}

server {
    server_name domain_2;
    [...]
}
etc..