Sakura VPS

I installed nginx
If i hit the IP, the CENTOS page will be displayed.

For example or

Even if both IPs are entered, the following is displayed.

By the way
As above, dare before html. If i delete the URL and hit the URL
An nginx error message is displayed.

There is no index.html file.

sudo systemctl start nginx

has been implemented.

sudo systemctl status nginx

This is the error I'm interested in. Failed to parse PID from file /run/nginx.pid: Invalid argument

The result is:

$sudo systemctl status nginx

  • nginx.service-The nginx HTTP and reverse proxy server
    Loaded: loaded (/usr/lib/systemd/system/nginx.service;enabled;vendor preset: disabled)
    Active: active (running) since Tue 2019-11-26 17:33:47 JST;49min ago
    Main PID: 9123 (nginx)
    CGroup: /system.slice/nginx.service
    | -1919 nginx: master process/usr/sbin/nginx
    `-1818 nginx: worker process

Starting The nginx HTTP and reverse proxy server ...
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Failed to parse PID from file /run/nginx.pid: Invalid argument
Started The nginx HTTP and reverse proxy server.

How can I display the following normal nginx top page?

  • Answer # 1

    It can be changed by replacing


    I think there are many ways to do this, but you can either reinstall Nginx and restore it to the default state, or download the tar.gz file from the head family and overwrite it with the index.html you get from it. The

    If you want to reinstall

    # yum -y remove nginx
    # ls -l/usr/share/nginx/html /
    Total 0 ← Confirm that files have disappeared
    # yum -y install nginx
    # ls -l/usr/share/nginx/html /
    Total 24
    -rw-r--r--. 1 root root 3971 Oct 8 06:16 404.html
    -rw-r--r--. 1 root root 4020 Oct 8 06:16 50x.html
    -rw-r--r--. 1 root root 4057 Oct 8 06:16 index.html ← Default index.html
    -rw-r--r--. 1 root root 368 Oct 8 06:16 nginx-logo.png
    -rw-r--r--. 1 root root 4148 Oct 8 06:16 poweredby.png

    * Settings files etc. will be deleted, so please back up the files if necessary.

    To get a file from tar.gz

    # wget https://nginx.org/download/nginx-1.16.1.tar.gz ← Please replace the version appropriately
    # tar xfz nginx-1.16.1.tar.gz
    # ls -l nginx-1.16.1/html
    Total 8
    -rw-r--r--. 1 1001 1001 494 Aug 13 21:51 50x.html
    -rw-r--r--. 1 1001 1001 612 Aug 13 21:51 index.html ← Default index.html
    # install -o root -g root -m 0644 nginx-1.16.1/html/index.html/usr/share/nginx/html/