location ~ \.php$ { {% if REMOTE_PHP != "" +%} set $backend "{{ REMOTE_PHP }}:9000"; fastcgi_pass $backend; {% elif LOCAL_PHP != "" +%} fastcgi_pass unix:{{ LOCAL_PHP }}; {% endif %} fastcgi_index index.php; }