G
G
Gleb Zhukov2016-11-03 10:52:40
System administration
Gleb Zhukov, 2016-11-03 10:52:40

Why index in nginx is not available 403 Forbidden?

In general, if you specify the path, then the redirect to index.php works. But if you just specify the domain, then the index document is not returned. You can see it here 188.120.245.244/home (domain name not purchased yet)
Here is the nginx config:
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/gotlib;
index index.html index.htm index.php index.nginx-debian.html;
server_name gotlib.info;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php;
index index.php;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
# With php7.0-cgi alone:
​​#fastcgi_pass 127.0.0.1:9000;
# With php7.0-fpm:
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
}

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