Answer the question
In order to leave comments, you need to log in
How to set limits for Apache?
Good afternoon.
Please tell a newbie. Installed LAMP on my VDS. Set up CMS and hosted the site. Faced the problem that any other domain directed to the IP address of my VDS displays my site.
From here the question. How to set restrictions in such a way that the content displays only one specific domain, and all the others give an error.
Answer the question
In order to leave comments, you need to log in
The issue was resolved by specifying multiple virtual hosts.
Thanks to all.
you have a problem in a virtual host.
To solve it, you really need to go to the admin panel, create a new site by specifying it explicitly and not in the default folder, and then you will be happy.
If not, then you need to do something like this.
RewriteCond %{HTTP_HOST} ^!(www|)\.site\.ru [NC]
RewriteRule ^(.*)$ http://%{HTTP_HOST}/404.php [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question