Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Hotlink protection and hidden version number optimized by Apache

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

What is hotlink protection?

The definition of "theft chain" is that this content is not on its own server, but through technical means, it bypasses the final page where it is beneficial for others to advertise, and provides this content directly to the end user on its own advertising and profitable page. It is often some obscure small websites to steal the addresses of some powerful large websites (such as some music, pictures, software download addresses) and then put them on their own websites, in this way to steal the space and traffic of large websites.

Experiment

Install bind package and configure DNS domain name resolution service

For more information about dns, please see: https://blog.51cto.com/14557905/2453070

1. Modify the configuration file

two。 Turn on the service and turn off the firewall

II. Compile and install Apache manually

1. For more information on the compilation process, please see: https://blog.51cto.com/14557905/2459413

/ / manually compile and install Apachetar zxvf apr-1.6.2.tar.gz-C / opttar zxvf apr-util-1.6.0.tar.gz-C / opttar jxvf httpd-2.4.29.tar.bz2-C / optcd / optmv apr-1.6.2 httpd-2.4.29/srclib/aprmv apr-util-1.6.0 httpd-2.4.29/srclib/apr-util// install the software environment yum-y install\ gcc\ gcc-c++\ Make\ pcre-devel\ expat-devel\ pcre\ zlib-develcd httpd-2.4.29./configure\-prefix=/usr/local/httpd\-- enable-deflate\-- enable-so\-- enable-rewrite\-- enable-charset-lite\-- enable-cgimake & & make install

two。 Configure the domain name and listening address of httpd

3. Copy the picture to the default web directory

4. Add pictures to the default web page

5. Open the service view port

6. Check if you can browse the web on the client

This is the case where there is no hotlink protection, next we will configure hotlink protection

Third, configure the stolen chain machine

1. Install Apache and DNS domain name resolution services, and modify the configuration file to start the service

two。 Configure stealthy web pages

3. Configure the stolen chain machine with a DNS server to resolve the ip address

4. Turn off the firewall and turn on the service and use the client to view

Has successfully stolen the chain, our goal is not to let him steal our pictures, so next we have to configure hotlink protection!

5. Add rules to the host httpd configuration file and open the restart module

In / usr/local/httpd/htdocs/, add the error.png file

6. Validation syntax

There is no grammar error.

7. Restart the httpd service

8. Go to the client to view

Hotlink protection configuration is successful!

Configure apache to hide version information

Open the version number module

Modify Apache configuration file

Set the hidden version number

Access Apache on the client and grab the package test

After refreshing, the version number is hidden

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report