S
S
SeoNk2015-08-24 16:57:39
Nginx
SeoNk, 2015-08-24 16:57:39

Nginx setup: index.html and index.php in different directories?

Hello!
In nginx.conf there are such lines
root /home/site/www;
index index.html index.php;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/site/php$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
The fact is that I have index files in different directories:
/home/site/www/index.html
and
/home/site/php/index.php
How can I register that if there is no index file at the first address /home/ site/www/index.html file /home/site/php/index.php was running?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question