I have two files in perl and php e.g script.pl and script.php
php is listening on 6060.
how can i make it such that if script.pl returns nothing (or zero), it will be diverted to script.php?
location ~* "^/" {
rewrite ^/(.*) /script.pl?$1;
try_files $uri /script.php?$1 /index.html;
set $server_used 127.0.0.1:6060;
proxy_pass http://$server_used;
break;
}
basically i'm clueless how i can make script.php "be tried" if script.pl returns nothing or zero or 404 or whatever? can anyone help?
php is listening on 6060.
how can i make it such that if script.pl returns nothing (or zero), it will be diverted to script.php?
location ~* "^/" {
rewrite ^/(.*) /script.pl?$1;
try_files $uri /script.php?$1 /index.html;
set $server_used 127.0.0.1:6060;
proxy_pass http://$server_used;
break;
}
basically i'm clueless how i can make script.php "be tried" if script.pl returns nothing or zero or 404 or whatever? can anyone help?