Set global handling for PHP scripts in NGINX + PHP-FPM
Posted
by
Radio
on Server Fault
See other posts from Server Fault
or by Radio
Published on 2012-10-20T19:47:55Z
Indexed on
2012/10/20
23:05 UTC
Read the original article
Hit count: 262
I have to define fastcgi_pass for every virtual host. How do I define it global-wise?
server {
listen 80;
server_name www.domain.tld;
location / {
root /home/user/www.domain.tld;
index index.html index.php;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/user/domain.tld$fastcgi_script_name;
include fastcgi_params;
}
}
© Server Fault or respective owner