A
A
Aligatro2017-05-22 19:36:18
Nginx
Aligatro, 2017-05-22 19:36:18

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

3 answer(s)
B
Bastax13, 2017-05-23
@Aligatro

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)

S
Sanes, 2017-05-22
@Sanes

I'm just not very strong in server administration and I'm not familiar with nginx at all.

So you freelance. No one is going to teach you. Especially within the Toaster.

B
Barmunk, 2017-05-22
@Barmunk

so there is clearly a problem with dns, not a socket. Most likely in the domain settings there is something like *.name.ru cname name.ru. The panel cannot by default open something that is not there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question