How do I config NGINX to omit 'index.php' in URL

I set ‘auto index’ to ‘on’ and when I visit it will automatically redirect to problem is when I visit URLs like which represents for it’s an 404.

How to omit index.php in every URL completely?

I never tried Yii under nginx, but something like this should work:

location / {

        try_files $uri $uri/ /index.php?$args;


Sorry for late update. Thank you all, I have solved my problem.

As far as I know, the documentation you’ve mentioned is not with any tutorial or any downloads.

Hope this important document will be in the tutorial someday.

It’s pretty new. Will be online with next Yii release.