Report this

What is the reason for this report?

installed wordpress home page display 404

Posted on December 13, 2020

Hi

I had a wordpress installed but suddenly today the home page displays 404 nginx error

after I check the error log those display

2020/12/13 19:23:20 [error] 31432#0: *764 open() "/var/www/html/wordpress/404.html" failed (2: No such file or directory), client: 45.135.186.94, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://unix$:/run/php-fpm/www.sock", host: "MY IP HERE"

it looks like nginx having some problem then looking for my 404 page but what will be the cause of this ?

I visit http://my_ip_here and encounter 404

but if I visit http://my_ip_here/wp-login.php I can see the login page and can login to admin dashboard.

any ideas ? thanks highly appreciated ! (bow)


user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;

events {
    worker_connections 1024;
}

http {
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 2048;

    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;

    # Load modular configuration files from the /etc/nginx/conf.d directory.
    # See http://nginx.org/en/docs/ngx_core_module.html#include
    # for more information.
    include /etc/nginx/conf.d/*.conf;

    server {
        listen       80 default_server;
        listen       [::]:80 default_server;
        server_name  _;
        #root         /usr/share/nginx/html;
        root /var/www/html/wordpress;

        # Load configuration files for the default server block.
        include /etc/nginx/default.d/*.conf;

        location / {

        
        }

        error_page 404 /404.html;
            location = /40x.html {
        }

        error_page 500 502 503 504 /50x.html;
            location = /50x.html {
        }
    }

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.