It should be:
index index.php index.html index.htm
A directive is an "index".
In addition, "try_files" is erroneous. Change to:
try_files $uri $uri/ /index.php$is_args$args
It is also much nicer to have a formatted configuration file. This makes debugging easier.
I suspect that the textbook you followed is incorrect, it is definitely invalid, as directives must be named first before trying to assign something to it.
Perhaps a note will appear for the author of the textbook? It would be great if they fixed it so that no one gets on it :)
source share