>õËÁÚÁÔØ ×ÔÏÒÏÊ location ×ÎÕÔÒÉ ÐÅÒ×ÏÇÏ.
åÓÌÉ ÔÁË:
location / {
šroot /www/beta/html;
šindex šindex.html index.php;
}
ÔÏ ÄÏÌÇÏÖÄÁÎÎÙÊ 403 Ñ ÐÏÌÕÞÁÀ ÔÏÌØËÏ ÎÁ http://site.org/administrator, ÎÏ ÎÅ ÎÁ http://site.org/administrator/index.php
åÓÌÉ ÔÁË:
š š š šlocation ~ \.php$ {
š š š š š š š šlocation ~* ^(/administrator/).+\.(php) {
š š š š š š š š š š š šdeny all;
š š š š š š š š}
š š š š š š š šrewrite ^/ajaxTags.php /ajax_functions.php last;
š š š š š š š šfastcgi_buffer_size 256k;
š š š š š š š šfastcgi_buffers 6 512k;
š š š š š š š šfastcgi_pass š
127.0.0.1:8000;
š š š š š š š šfastcgi_index šindex.php;
š š š š š š š šfastcgi_param šSCRIPT_FILENAME š/www/beta/html$fastcgi_script_name;
š š š š š š š šinclude š š š šfastcgi_params;
š š š š}
ôÏ ÏÐÑÔØ ÖÅ ÓËÁÞÉ×ÁÀÔÓÑ php-ÓËÒÉÐÔÙ × ÞÉÓÔÏÍ ×ÉÄÅ.
é ÔÏÌØËÏ ÔÁËÉÍ ÏÂÒÁÚÏÍ:
š š š šlocation ~ \.php$ {
š š š š š š š šlocation ~* ^(/administrator/).+\.(php) {
š š š š š š š š š š š šdeny all;
š š š š š š š š š š š šfastcgi_buffer_size 256k;
š š š š š š š š š š š šfastcgi_buffers 6 512k;
š š š š š š š š š š š šfastcgi_pass š
127.0.0.1:8000;
š š š š š š š š š š š šfastcgi_index šindex.php;
š š š š š š š š š š š šfastcgi_param šSCRIPT_FILENAME š/www/beta/html$fastcgi_script_name;
š š š š š š š š š š š šinclude š š š šfastcgi_params;
š š š š š š š š}
š š š š š š š šrewrite ^/ajaxTags.php /ajax_functions.php last;
š š š š š š š šfastcgi_buffer_size 256k;
š š š š š š š šfastcgi_buffers 6 512k;
š š š š š š š šfastcgi_pass š
127.0.0.1:8000;
š š š š š š š šfastcgi_index šindex.php;
š š š š š š š šfastcgi_param šSCRIPT_FILENAME š/www/beta/html$fastcgi_script_name;
š š š š š š š šinclude š š š šfastcgi_params;
š š š š}
Ñ ÄÏÂÉÌÓÑ ÎÕÖÎÏÇÏ ÒÅÚÕÌØÔÁÔÁ. îÏ ÍÅÎÑ ÏÞÅÎØ ÓÍÕÝÁÅÔ ÔÏ, ÞÔÏ ÄÕÂÌÉÒÕÅÔÓÑ ÃÅÌÁÑ ÓÅËÃÉÑ ÐÁÒÁÍÅÔÒÏ×. ÎÅÌØÚÑ ÌÉ ÄÏÂÉÔÓÑ ÎÕÖÎÏÇÏ ÒÅÚÕÌØÔÁÔÁ ÂÏÌÅÅ ÉÚÑÝÎÙÍ ÓÐÏÓÏÂÏÍ?
Posted at Nginx Forum: http://forum.nginx.org/read.php?21,87472,87668#msg-87668