Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i'm setting up an webserver based on nginx and php-fpm. All is ok but my domain opens just directory on www.domain.com/ - it should open index.php as i got this in my config:

location / {
    autoindex  on;
    try_files $uri $uri/ /index.php;
}

It should open index.php when typing www.domain.com - but it dont. How i can set root file - index.php index.html index.htm?

share|improve this question

Your server block needs to contain the index directive.

server {
    index index.php;
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.