Welcome to Centmin Mod Community
Register Now

Wordpress Can't manage to reach /wp-admin after option 22 install

Discussion in 'Blogs & CMS usage' started by tturner13, Jun 13, 2019 at 3:46 AM.

  1. tturner13

    tturner13 New Member

    4
    0
    1
    Thursday
    Ratings:
    +0
    Local Time:
    6:51 AM
    Hi

    I tried installing a new wordpress on a new domain today through Centminmod, but after 3 tries I still haven't been able to install Wordpress correctly.

    I use a CentOS 7.6 x64 droplet on Digital Ocean. Nameservers on my host are referring to the DO nameservers.

    On my first try I tried to install the Stable release of centminmod (123.08stable). After doing the PHP upgrade (7.0.3) through Centmin menu and adjusted the config to 'LETSENCRYPT_DETECT='y'', I installed Wordpress through option 22. After the installation I could not reach domain.com/wp-admin, says the site can't be reached, IP address cannot be found.

    Checked Centminmod documentation, noticed it is advised to use the latest beta release. Removed the CentOS droplet on Digital Ocean, created a new one (same OS, CentOS 7.6 x64) and installed Centminmod 123.09beta01 this time. Enabled the 'LETSENCRYPT_DETECT='y' line and installed Wordpress again through option 22. After the installation was complete, I again browsed to domain.com/wp-admin but got the same message: site can't be reached, IP address cannot be found.

    Removed Wordpress installation through the wp_uninstall command and reinstalled again through option 22, this time without the SSL certificates (thought this maybe had to do something with my problem). However, after installation was finished I got the same message (tried to reach domain.com/wp-admin on different devices and incognito, same result).

    However, when I browse directly to the IP of my Digital Ocean droplet, I do get to see the Centmin Mod NGINX test page. So now I am wondering if there is an issue with the DNS settings/config, however I checked some online tutorials and I don't see any mention of additional steps regarding this (just to configure DO nameservers on my hosting platform, install CentOS droplet and centminmod afterwards, install wordpress through option 22, afterwards WP should be reachable through /wp-admin).

    Am I missing something?

    Kind regards
     
  2. tturner13

    tturner13 New Member

    4
    0
    1
    Thursday
    Ratings:
    +0
    Local Time:
    6:51 AM
    UPDATE: fixed it, didn't noticed the A record from domainname to droplet IP was gone in my Digital Ocean network settings :whistle:

    EDIT: when I choose for option 22 now, I get this error message:

    Error: domain.com is already setup for server main hostname
    at /usr/local/nginx/conf/conf.d/virtual.conf
    It is important that main server hostname be setup correctly

    As per Getting Started Guide Step 1 centminmod.com/getstarted.html
    The server main hostname needs to be unique. So please setup
    the main server name vhost properly first as per Step 1 of guide.

    Aborting nginx vhost creation...

    I checked the getstarted documentation but after adding a new vhost through option 2 (including a record) I still get this message. Additionally, I checked some online tutorials and none of them mention anything about adding or editing the vhost, I thought I could just enter option 22 and then enter my domain? I'm a bit lost now.
     
    Last edited: Jun 13, 2019 at 6:24 AM
  3. eva2000

    eva2000 Administrator Staff Member

    40,204
    8,892
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,704
    Local Time:
    2:51 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    ah yes correct domain DNS A records are a must :)

    that's the clue your main hostname vhost virtual.conf config file's server_name already exists with value that you intend to use for centmin.sh menu option 2 or 22 new nginx vhost domain site - so there's a conflict.

    When you install Centmin Mod it's setup a main hostname nginx vhost host for server which is where Nginx default install index page is shown. Accessing server via IP address will show that page and it's correct and should be left as is as the main hostname site is also used for statistics pages outlined here. When you create a new Nginx vhost site via centmin.sh menu option 2, 22 or nv commands, you have a separate Nginx vhost directory structure. The differences are outlined on official Config file page and at Getting Started Guide step 1 and bottom of that page here.
    What does your /usr/local/nginx/conf/conf.d/virtual.conf and /usr/local/nginx/conf/conf.d/yourdomain.com.conf contents look like ? Make sure virtual.conf main hostname's server_name isn't same as any added nginx vhost site's domain name as per Getting Started Guide step 1, the main hostname needs to be unique.

    You can check via recursive grep filter of your domain name in vhost directory at /usr/local/nginx/conf/conf.d
    Code (Text):
    grep -rnw 'yourdomain.com' /usr/local/nginx/conf/conf.d
    

    Also check DNS is correct use dig to check DNS for domain
    Code (Text):
    dig +short A @8.8.8.8 yourdomain.com
    dig +short A @8.8.8.8 www.yourdomain.com
    dig +short A @8.8.8.8 hostname.yourdomain.com
    

    check HTTP headers via curl for both HTTP (and HTTPS if you have HTTPS/SSL)
    Code (Text):
    curl -I http://yourdomain.com
    curl -I http://www.yourdomain.com
    curl -I https://yourdomain.com
    curl -I https://www.yourdomain.com
    curl -I http://hostname.yourdomain.com
    
     
  4. tturner13

    tturner13 New Member

    4
    0
    1
    Thursday
    Ratings:
    +0
    Local Time:
    6:51 AM
    Hi Eva2000

    Thanks for the feedback. I slowly worked my way through Getting Started Guide - CentminMod.com LEMP Nginx web stack for CentOS and changed the hostname, as it currently was the domain itself (installed on Digital Ocean). After going through the steps and changing the hostname, I managed to complete the Wordpress installation including working Letsencrypt SSL certificate!
     
  5. eva2000

    eva2000 Administrator Staff Member

    40,204
    8,892
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,704
    Local Time:
    2:51 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Glad to hear - 95% of everything you need for Centmin Mod can be learnt from reading the Getting Started Guide and it's linked guides/instructions. Hence, why it's recommended to read Getting Started Guide after initial Centmin Mod install :D
     
..