12.13 Nginx anti-theft chain
Cd/usr/local/nginx/conf/vhost
VI test.com.conf
Copy the above content to a location
Test, success
Premise data/wwwroot/test.com directory to have 1.gif
12.14 Nginx Access Control
Cd/usr/local/nginx/conf/vhost
VI test.com.conf
fffff,t_100,g_se,x_10,y_10,shadow_90,type_zmfuz3pozw5nagvpdgk= "alt=" nginx anti-theft chain nginx access control Nginx parsing PHP-related configuration nginx agent "/ >
The Test status code is 200.
Replace IP re-Test status code is 200
To view the log, the source IP of 192.168.133.150 is 192.168.133.130
Prohibit. PHP parsing
Match regular, prohibit a PHP access
Editing a configuration file
Loading services and creating files
The test was denied access
How to access the 2.txt is allowed to be accessed
View Logs
Restrictions according to User_agent
Test
How to ignore the case is to match the symbol ~ followed by a
AddTest before the number
After adding the * number
Create vi/data/wwwroot/test.com/3.php
Write content
<?php
Phpinfo ();
Curl accesses 3.php, no way to parse only the code that shows it
/usr/local/nginx/sbin/nginx-t
/usr/local/nginx/sbin/nginx-s Reload
Then execute the curl-x127.0.0.1 test.com/3.php and you can parse it.
Unix:/tmp/php-fcgi.sock write the wrong one less F, then access will prompt 502
Because I can't find the sock file.
View Logs
Vi/usr/local/php-fpm/etc/php-fpm.conf
Change the listening port to IP
Usr/local/php-fpm/sbin/php-fpm-t
/usr/local/nginx/sbin/nginx-s Reload
Then you need to restart/ETC/INIT.D/PHP-FPM reload
Viewing the Listening port
Access Tips 502
You need to change the configuration file
Load reboot
And curl access is not 502.
So after the 502 error will be checked to check what the port is, is not the configuration file corresponding to
There is also a case where the PHP-FPM process is exhausted and will prompt 502, this situation needs to be optimized
12.16 Nginx Agent
/usr/local/nginx/sbin/nginx-t
/usr/local/nginx/sbin/nginx-s Reload
Test
Extended
502 Questions Summary http://ask.apelearn.com/question/9109
Location-Priority http://blog.lishiming.net/?p=100
Nginx anti-theft chain nginx access control Nginx parsing PHP-related configuration Nginx agent