• Resolved robertqiu

    (@robertqiu)


    Hi There,
    I rent a cloud host(VM) in the cloud and connect the VM to the[ redundant link removed ]. I trying to install WordPress.
    No wonder where the problem is, I can NOT enter the WordPress installation process via the web.

    The software I used is:

    
    [root@VM_16_8_centos wordpress]# nginx -v
    nginx version: nginx/1.12.2
    [root@VM_16_8_centos wordpress]# php -v
    PHP 7.3.7 (cli) (built: Jul  3 2019 11:30:22) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.3.7, Copyright (c) 1998-2018 Zend Technologies
    [root@VM_16_8_centos wordpress]# mysql --version
    mysql  Ver 14.14 Distrib 5.7.27, for Linux (x86_64) using  EditLine wrapper
    

    I Setup the wp-config.php in path /var/www/wordpress.

    
    /** The name of the database for WordPress */
    define( 'DB_NAME', 'wordpress' );
    
    /** MySQL database username */
    define( 'DB_USER', 'wordpressuser' );
    
    /** MySQL database password */
    define( 'DB_PASSWORD', '......' );
    

    I set the root directoty in /etc/nginx/conf.d/default.conf,

    
    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   https://127.0.0.1;
        #}
    
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
            root           /var/www/wordpress;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }
    

    Anyway, no matter what I do, it does not work when I use my MacBook chrome to visit the website. The website always display “the welcome page of Nginx”.

    Anyone give some help, many thanks in advance!

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter robertqiu

    (@robertqiu)

    Figure it out!
    Two reasons:
    1) update /etc/nginx/nginx.conf, modify the root path

    
    [root@VM_16_8_centos wordpress]# cat /etc/nginx/nginx.conf
    # For more information on configuration, see:
    #   * Official English Documentation: https://nginx.org/en/docs/
    #   * Official Russian Documentation: https://nginx.org/ru/docs/
    
    user nginx;
    worker_processes auto;
    error_log /var/log/nginx/error.log;
    pid /run/nginx.pid;
    
    # Load dynamic modules. See /usr/share/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 https://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/wordpress;
    
            # Load configuration files for the default server block.
            include /etc/nginx/default.d/*.conf;
    
            location / {
            root   /var/www/wordpress;
            index index.php  index.html index.htm;
         }
    
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
            root           /var/www/wordpress;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;
            #Enable fastcgi interception error log
            fastcgi_intercept_errors on;
        }
    
            error_page 404 /404.html;
                location = /40x.html {
            }
    
            error_page 500 502 503 504 /50x.html;
                location = /50x.html {
            }
        }
    
    # Settings for a TLS enabled server.
    #
    #    server {
    #        listen       443 ssl http2 default_server;
    #        listen       [::]:443 ssl http2 default_server;
    #        server_name  _;
    #        root         /usr/share/nginx/html;
    #
    #        ssl_certificate "/etc/pki/nginx/server.crt";
    #        ssl_certificate_key "/etc/pki/nginx/private/server.key";
    #        ssl_session_cache shared:SSL:1m;
    #        ssl_session_timeout  10m;
    #        ssl_ciphers HIGH:!aNULL:!MD5;
    #        ssl_prefer_server_ciphers on;
    #
    #        # 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 {
    #        }
    #    }
    
    }
    

    2)php-fpm is not started

    
    service nginx restart
    netstat -ntulp |grep 9000
    service php-fpm restart
    
    • This reply was modified 5 years, 7 months ago by Jan Dembowski.
Viewing 1 replies (of 1 total)
  • The topic ‘No way starting the wordpress installation in web’ is closed to new replies.