What is anti-hotlinking
definition of "hotlinking" is: This content is not on your own server, through technical means, bypassing the others who have an interest in advertising the last page, available to end users directly on their pages there are ads with interests this content. Often some of the little-known Web site to steal address some of the strength of large websites (such as some music, pictures, software download address) and then placed in your site, steal a large space website by this method and flow.
Experiments
First, install the bind package configuration DNS DNS service
For more information about dns View: https://blog.51cto.com/14557905/2453070
1. Modify Profile
2. Open the service, turn off the firewall
Second, the manual compile and install the Apache
1. The detailed compilation process can be viewed: https://blog.51cto.com/14557905/2459413
//手工编译安装Apache
tar zxvf apr-1.6.2.tar.gz -C /opt
tar zxvf apr-util-1.6.0.tar.gz -C /opt
tar jxvf httpd-2.4.29.tar.bz2 -C /opt
cd /opt
mv apr-1.6.2 httpd-2.4.29/srclib/apr
mv apr-util-1.6.0 httpd-2.4.29/srclib/apr-util
//安装软件环境
yum -y install \
gcc \
gcc-c++ \
make \
pcre-devel \
expat-devel \
pcre \
zlib-devel
cd httpd-2.4.29
./configure \
--prefix=/usr/local/httpd \
--enable-deflate \
--enable-so \
--enable-rewrite \
--enable-charset-lite \
--enable-cgi
make && make install
2. Configure httpd domain name and listen address
3. Copy the picture to the default directory page
4. Picture added to the default page
5. Turn Care View port
6. On the client to see if you can browse the web
in the case that there is no anti-hotlinking, Next we configure the security chain
three hotlinking machine configuration
1. install Apache, DNS domain name resolution services, and modify the configuration file to start the service
2. configure hotlinking page
3. hotlinking machine to configure the DNS server to resolve the ip address
4. Close firewall service is turned on and use the client view
has been successfully hotlinking, our aim is to not let him Daolian our image, so then we have to configure the security chain!
5. Add host httpd rule configuration file, and restart the module opening
in the / usr / local / httpd / htdocs / added error.png file
6. validate the syntax
no syntax error
7. httpd service restart
8. View to the client
anti-theft chain configuration is successful! !
Hide apache configuration version information
turned on the version number of the module
to modify the Apache configuration file
settings to hide the version number of
the Apache on the client and capture test
after refreshing, the version number is hidden