R
R
refsurf2016-08-06 11:49:00
Nginx
refsurf, 2016-08-06 11:49:00

How to disable unnecessary subdomains on ispmanager + nginx?

As needed, I had to switch to nginx on the vps was ispmanager because it was not particularly strong in it set as is (just switched in PHP settings in FastCGI mode (Nginx + PHP-FPM)
) subdomains 1.site.ru ww.site.ru asdaf.site.ru any value up to the point works as a duplicate of the site. The site should open only on site.ru Everything else is desirable to redirect to pages without a subdomain or even to site.ru/error404.php
How can I remove this or at least close it from indexing. Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lindon_cano, 2016-08-07
@Lindon_cano

server {

        listen site.ru;
        server_name site.ru;

        if ($host !~* ^(site.ru)$ ) {
                return 444;
        }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question