On Tue, Jun 23, 2015 at 5:32 AM, E.B. <[email protected]> wrote:

>>
>> You're probably looking for this
>>
>> fastcgi_param SCRIPT_FILENAME /another/different/path/anotehrscript.php;
>
> Excellent point! Thanks you!
> However, what if the alias was NOT to a php file? Is using
> rewrite the only solution - alias not able to working? What
> is alias doing to cause 404?

This config works for me.

  location ~ ^/test {
    alias /data/public_html/somefile.php;
    include fastcgi.conf;
    fastcgi_pass 127.0.0.1:8900;
  }

Check what your error log says to find out why it returns 404.

Also the question mark you put will become part of file name php look
for (it'll look for 'file.php?' instead of 'file.php'.

_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to