The solution to Apache's malicious parsing bindings

Source: Internet
Author: User

Let's explain what a malicious binding is.

Is someone else through ping get to your domain name IP, will own domain name also resolves to your IP up.

Why is it possible to bind like this?

Because Apache is requested, it will find the corresponding domain name in the file of the virtual domain name configuration to find the corresponding directory. So the question is, what if the requested domain name is not found in the configuration? In fact, Apache can not find the corresponding domain name configuration, the first configured virtual domain name is requested by default. This causes others to bind their domain name to someone else's server.

OK, now that we know the reason, then the following is the solution, in fact, it is very simple.

Workaround:

Modify the Apache virtual Domain configuration file httpd-vhosts.conf, add the following code

<virtualhost *:80><ifmodule mod_rewrite.c>rewriteengine onrewriterule ^/(. *) http://www.xx.com/$1 [L,R= 301] # www.xx.com is the domain URL you want to jump to </IfModule></VirtualHost>

It is important to note that the above configuration should be placed at the front, and the domain name to jump to is already configured in the configuration file, otherwise it will cause repeated redirection, resulting in the site inaccessible.

The solution to Apache's malicious parsing bindings

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.