Hello everyone,
I try to configure PHP with an nginx server (with this instruction https://www.cyberciti.biz/faq/how-to-install-php-on-opensuse-15-2-15-1/ ), but get 404 NOT FOUND when try URL http://127.0.0.1/index.php . My nginx.conf file:
worker_processes 1;
events {
worker_connections 1024;
use epoll;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
include conf.d/*.conf;
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
location / {
root /srv/www/htdocs/;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /srv/www/htdocs/;
}
# PHP config #
location ~ \.php$ {
# 404
try_files $fastcgi_script_name =404;
# default fastcgi_params
include /etc/nginx/fastcgi_params;
# fastcgi settings
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
# fastcgi params
fastcgi_param DOCUMENT_ROOT $realpath_root;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
}
}
include vhosts.d/*.conf;
}
What could be a reason of this?