I am new to nginx and try to implement a webserver and access the index.php. If i try to visit the index.php nginx returns me an 404 Error.
This is my sites-enabled config :
server {
listen 80;
listen [::]:80;
server_name example.com www.example.com;
root /var/www/ilias;
index index.php;
#access_log /var/log/nginx/example.com.access.log;
#error_log /var/log/nginx/example.com.error.log;
access_log /var/log/nginx/ilias.access.log;
error_log /var/log/nginx/ilias.error.log;
client_max_body_size 100M;
autoindex off;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
include fastcgi_params;
fastcgi_intercept_errors on;
}
}
I dont see a mistake, at least it should display me the index.php