I have got a server setup with nginx + php-fpm and mysql I have another server with only installed php-fpm , So wanted to use the load equilibrium but when I am using this dedicated server as a load balancer with php-fpm, I get an error when opening the page: "Access denied."
/etc/nginx/nginx.conf /etc/nginx/sites-enabled/site.org.conf Why did I get this error? When I only change fastcgi_pass to 127.0.0.1:9000 - all work fine. If it is blank, the page has been "denied access", the reason for this is added in php-fpm has gone. If you do not have this in your php-fpm configuration, it is the default for .php and prevents all other file types being "denied access" by parsing it via a PHP interpreter While trying to do this, it is.
User www-data; Worker_processes 3; Error_log /var/log/nginx/error.log; Pid /var/run/nginx.pid; Event {worker_connections 1024; } Http {include mime.types; Default_type application / octet-stream; Server_names_hash_bucket_size64; Access_log /var/log/nginx/access.log; Send file on; #tcp_nopush on; Keepalive_timeout 65; Tcp_nodelay on; #gzip; Upstream PHP {server dedicated server: 9 000; } / Etc / nginx / sites-enabled / *; }
server {81; Server_name site.org www.site.org; Access_log /var/log/nginx/site.org.log; Error_log /var/log/nginx/site.org.log; Root /home/www/site.org; Index index.php; Place ~ .php $ {fastcgi_pass php; Fastcgi_index index.php; Fastcgi_param SCRIPT_FILENAME / home / www / $ fastcgi_script_name; }}
Comments
Post a Comment