Answer the question
In order to leave comments, you need to log in
How to block non-existent domains and remove the port in the address of the VestaCP admin panel?
Good evening gentlemen. Please tell me, firstly, how to put a redirect for all non-existing subdomains, so that when you go to some-not-existing-subdomain.domain.ru, it throws a 404 error and not the contents of domain.ru?
I'm just not very strong in server administration and I'm not familiar with nginx at all. I found some wild way with creating a "server" for each domain with a set of rules and proxying everything else to a 404 page. But even creating a set of rules for each domain on a server with handles is somehow wild or something, that's why I decided to consult with you.
Secondly, I'm wondering how to make Vesta work on port 80 (just to remove the port in the url, outweighing the port is not an end in itself) along with nginx on the same port, in order to exclude the display of the port number in the url (instead of panel.domain. en:8083 -> panel.domain.ru). The method in the next topic did not work, the service does not start due to a port conflict with nginx, perhaps a more elegant solution has appeared.
Thanks a lot for your help. Peace to you =)
Answer the question
In order to leave comments, you need to log in
You can't hang port 80 - nginx will stumble. To remove the port, you need to use proxying: nginx.org/ru/docs/http/websocket.html (sorry it's not short, I'm on my phone)
I'm just not very strong in server administration and I'm not familiar with nginx at all.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question