Answer the question
In order to leave comments, you need to log in
How to set up php processing for multiple locations in nginx?
Hello!
Set a password to access the Joomla admin panel in nginx:
location ^~ /administrator/ {
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htpasswd;
location ~* \.php$ {
# размеры буффера
fastcgi_buffer_size 128k;
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
try_files $uri = 404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# сокет php-fpm
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_read_timeout 300;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question