Eu tenho uma configuração NGINX definida como abaixo para que o acesso
stg.server.org
seja atendido por PHP 5.6 (php56-php-fpm running on port 9000)
e
stg.server.org/simon/apps/
será atendido, PHP 7.3 (php-fpm running on port 9001)
mas sem sucesso. Alguém tem uma pista de como conseguir isso?
server {
listen stg.server.org:80;
server_name stg.server.org;
root /var/www/html/;
index index.php index.html index.htm;
#charset koi8-r;
access_log /var/log/nginx/access_log;
error_log /var/log/nginx/error_log error;
location / {
root /var/www/html/;
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$query_string;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
root /var/www/html/;
fastcgi_pass 127.0.0.1:9000; #php-fpm PHP 5.6
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
include /etc/nginx/fastcgi_params;
}
location /simon/apps/ {
root /var/www/stg.server.org/simon/apps/;
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$query_string;
location ~ \.php$ {
root /var/www/apps-stg.unep.org/simon/pims/;
try_files $uri =404
fastcgi_pass 127.0.0.1:9001; #php-fpm PHP 7.3
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
}