Learn about Centmin Mod LEMP Stack today
Register Now

Wordpress wp-login Missing After Install

Discussion in 'Blogs & CMS usage' started by WaffleGerm, Sep 22, 2022.

  1. WaffleGerm

    WaffleGerm New Member

    5
    1
    3
    Sep 22, 2022
    Ratings:
    +1
    Local Time:
    6:22 PM
    1.21.6
    10
    I installed centmin for the first time today, and thought i'd try it loading a wordpress site. I used option 22 to install wordpress. I didn't have any issues doing so and the site seems to work well. However when i try to login as an admin through site.com/wp-login.php i recive a blue screen saying "SITE MAINTENANCE Performing some site maintenance. Will be back shortly!". I tried a few different configurations of wordpress, but I seem to recive this same message no matter what. What am I doing wrong, and how can I login as admin.

    thank you in advance for your help.

     
  2. eva2000

    eva2000 Administrator Staff Member

    49,359
    11,306
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,591
    Local Time:
    8:22 AM
    Nginx 1.21.x
    MariaDB 10.x
  3. WaffleGerm

    WaffleGerm New Member

    5
    1
    3
    Sep 22, 2022
    Ratings:
    +1
    Local Time:
    6:22 PM
    1.21.6
    10
    Thanks, for your quick response.
    Doesn't seem like that is it.
    this is my site, this is simply a test url on a test server. I'm trying to understand centmin before i start using it will all my wordpress sites.

    https://wptest2.tk/wp-login.php

    Could there be an issue with some other aspect of my configuration?

    I used the PHP 8.1.x default beta installer, should i try another version?
     
  4. eva2000

    eva2000 Administrator Staff Member

    49,359
    11,306
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,591
    Local Time:
    8:22 AM
    Nginx 1.21.x
    MariaDB 10.x
    Have you edited the generated Nginx vhost config file yet or still using the stock config generated via centmin.sh menu option 22 ?

    When you create a new nginx vhost domain via centmin.sh menu option 2 or menu option 22 or via /usr/bin/nv cli command line, you will create the Nginx vhost files and directories. You will get an outputted the path location where it will create the domain name's vhost conf file named newdomain.com.conf (and newdomain.com.ssl.conf if you selected yes to self signed SSL)
    • Nginx vhost conf path will be at /usr/local/nginx/conf/conf.d/newdomain.com.conf
    • Nginx HTTP/2 SSL vhost conf path will be at /usr/local/nginx/conf/conf.d/newdomain.com.ssl.conf
    • Nginx Self-Signed SSL Certificate Directory at /usr/local/nginx/conf/ssl/newdomain.com
    • Vhost public web root will be at /home/nginx/domains/newdomain.com/public
    • Vhost log directory will be at /home/nginx/domains/newdomain.com/log
    Please post the contents of /usr/local/nginx/conf/conf.d/newdomain.com.conf and if applicable /usr/local/nginx/conf/conf.d/newdomain.com.ssl.conf wrapped in CODE tags (outlined at How to use forum BBCODE code tags)

    what is output of these commands in ssh
    Code (Text):
    curl -I https://domain.com
    

    Code (Text):
    curl -I https://www.domain.com
    

    Code (Text):
    curl -I http://domain.com
    

    Code (Text):
    curl -I http://www.domain.com
    

    wrap output in CODE tags
     
  5. WaffleGerm

    WaffleGerm New Member

    5
    1
    3
    Sep 22, 2022
    Ratings:
    +1
    Local Time:
    6:22 PM
    1.21.6
    10
    I have not edited the config file I simply did everything through option 22.

    /usr/local/nginx/conf/conf.d/wptest2.tk.conf
    Code:
    # Centmin Mod Getting Started Guide
    # must read https://centminmod.com/getstarted.html
    
    # redirect from non-www to www
    # uncomment, save file and restart Nginx to enable
    # if unsure use return 302 before using return 301
    #server {
    #            listen   80;
    #            server_name wptest2.tk www.wptest2.tk;
    #            return 301 $scheme://www.wptest2.tk$request_uri;
    #       }
    
    server {
     
      server_name wptest2.tk www.wptest2.tk;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      #add_header X-Frame-Options SAMEORIGIN;
      add_header X-Xss-Protection "1; mode=block" always;
      add_header X-Content-Type-Options "nosniff" always;
      #add_header Referrer-Policy "strict-origin-when-cross-origin";
      #add_header Permissions-Policy "accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=()";
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
      access_log /home/nginx/domains/wptest2.tk/log/access.log combined buffer=256k flush=5m;
      #access_log /home/nginx/domains/wptest2.tk/log/access.json main_json buffer=256k flush=5m;
      error_log /home/nginx/domains/wptest2.tk/log/error.log;
    
      include /usr/local/nginx/conf/autoprotect/wptest2.tk/autoprotect-wptest2.tk.conf;
      root /home/nginx/domains/wptest2.tk/public;
      # uncomment cloudflare.conf include if using cloudflare for
      # server and/or vhost site
      include /usr/local/nginx/conf/cloudflare.conf;
      include /usr/local/nginx/conf/503include-main.conf;
    
      include /usr/local/nginx/conf/wpincludes/wptest2.tk/wpcacheenabler_wptest2.tk.conf;
      #include /usr/local/nginx/conf/wpincludes/wptest2.tk/wpsupercache_wptest2.tk.conf;
      # https://community.centminmod.com/posts/18828/
      #include /usr/local/nginx/conf/wpincludes/wptest2.tk/rediscache_wptest2.tk.conf; 
    
      location / {
      include /usr/local/nginx/conf/503include-only.conf;
     
    
      # Enables directory listings when index file not found
      #autoindex  on;
    
      # for wordpress super cache plugin
      #try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php?q=$uri&$args;
    
      # for wp cache enabler plugin
      try_files $cache_enabler_uri_webp $cache_enabler_uri $uri $uri/ $custom_subdir/index.php?$args;
    
      # Wordpress Permalinks
      #try_files $uri $uri/ /index.php?q=$uri&$args; 
    
      # Nginx level redis Wordpress
      # https://community.centminmod.com/posts/18828/
      #try_files $uri $uri/ /index.php?$args;
    
      }
    
    location ~* /(wp-login\.php) {
        limit_req zone=xwplogin burst=1 nodelay;
        #limit_conn xwpconlimit 30;
        auth_basic "Private";
        auth_basic_user_file /home/nginx/domains/wptest2.tk/htpasswd_wplogin;   
        include /usr/local/nginx/conf/php-wpsc.conf;
        # https://community.centminmod.com/posts/18828/
        #include /usr/local/nginx/conf/php-rediscache.conf;
    }
    
    location ~* /(xmlrpc\.php) {
        limit_req zone=xwprpc burst=45 nodelay;
        #limit_conn xwpconlimit 30;
        include /usr/local/nginx/conf/php-wpsc.conf;
        # https://jetpack.com/support/hosting-faq/
        include /usr/local/nginx/conf/jetpack_whitelist_ip.conf;
        # https://community.centminmod.com/posts/18828/
        #include /usr/local/nginx/conf/php-rediscache.conf;
    }
    
    location ~* /wp-admin/(load-scripts\.php) {
        limit_req zone=xwprpc burst=5 nodelay;
        #limit_conn xwpconlimit 30;
        include /usr/local/nginx/conf/php-wpsc.conf;
        # https://community.centminmod.com/posts/18828/
        #include /usr/local/nginx/conf/php-rediscache.conf;
    }
    
    location ~* /wp-admin/(load-styles\.php) {
        limit_req zone=xwprpc burst=5 nodelay;
        #limit_conn xwpconlimit 30;
        include /usr/local/nginx/conf/php-wpsc.conf;
        # https://community.centminmod.com/posts/18828/
        #include /usr/local/nginx/conf/php-rediscache.conf;
    }
    
      include /usr/local/nginx/conf/wpincludes/wptest2.tk/wpsecure_wptest2.tk.conf;
      include /usr/local/nginx/conf/php-wpsc.conf;
     
      # https://community.centminmod.com/posts/18828/
      #include /usr/local/nginx/conf/php-rediscache.conf;
      include /usr/local/nginx/conf/pre-staticfiles-local-wptest2.tk.conf;
      include /usr/local/nginx/conf/pre-staticfiles-global.conf;
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/drop.conf;
      #include /usr/local/nginx/conf/errorpage.conf;
      include /usr/local/nginx/conf/vts_server.conf;
    }
    /usr/local/nginx/conf/conf.d/wptest2.tk.ssl.conf
    Code:
    # Centmin Mod Getting Started Guide
    # must read https://centminmod.com/getstarted.html
    # For HTTP/2 SSL Setup
    # read https://centminmod.com/nginx_configure_https_ssl_spdy.html
    
    # redirect from www to non-www  forced SSL
    # uncomment, save file and restart Nginx to enable
    # if unsure use return 302 before using return 301
    # server {
    #   server_name wptest2.tk www.wptest2.tk;
    #    return 302 https://$server_name$request_uri;
    # }
    
    server {
      listen 443 ssl http2;
      server_name wptest2.tk www.wptest2.tk;
    
      include /usr/local/nginx/conf/ssl/wptest2.tk/wptest2.tk.crt.key.conf;
      include /usr/local/nginx/conf/ssl_include.conf;
    
      # cloudflare authenticated origin pull cert community.centminmod.com/threads/13847/
      #ssl_client_certificate /usr/local/nginx/conf/ssl/cloudflare/wptest2.tk/origin.crt;
      #ssl_verify_client on;
     
     
     
      # mozilla recommended
      ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
      ssl_prefer_server_ciphers   on;
      #add_header Alternate-Protocol  443:npn-spdy/3;
    
      # before enabling HSTS line below read centminmod.com/nginx_domain_dns_setup.html#hsts
      #add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
      #add_header X-Frame-Options SAMEORIGIN;
      add_header X-Xss-Protection "1; mode=block" always;
      add_header X-Content-Type-Options "nosniff" always;
      #add_header Referrer-Policy "strict-origin-when-cross-origin";
      #add_header Permissions-Policy "accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=()";
      #spdy_headers_comp 5;
      ssl_buffer_size 1369;
      ssl_session_tickets on;
     
      # enable ocsp stapling
      resolver 8.8.8.8 8.8.4.4 1.1.1.1 1.0.0.1 valid=10m;
      resolver_timeout 10s;
      ssl_stapling on;
      ssl_stapling_verify on;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
      access_log /home/nginx/domains/wptest2.tk/log/access.log combined buffer=256k flush=5m;
      #access_log /home/nginx/domains/wptest2.tk/log/access.json main_json buffer=256k flush=5m;
      error_log /home/nginx/domains/wptest2.tk/log/error.log;
    
      include /usr/local/nginx/conf/autoprotect/wptest2.tk/autoprotect-wptest2.tk.conf;
      root /home/nginx/domains/wptest2.tk/public;
      # uncomment cloudflare.conf include if using cloudflare for
      # server and/or vhost site
      include /usr/local/nginx/conf/cloudflare.conf;
      include /usr/local/nginx/conf/503include-main.conf;
    
      include /usr/local/nginx/conf/wpincludes/wptest2.tk/wpcacheenabler_wptest2.tk.conf;
      #include /usr/local/nginx/conf/wpincludes/wptest2.tk/wpsupercache_wptest2.tk.conf;
      # https://community.centminmod.com/posts/18828/
      #include /usr/local/nginx/conf/wpincludes/wptest2.tk/rediscache_wptest2.tk.conf; 
    
      location / {
      include /usr/local/nginx/conf/503include-only.conf;
     
    
      # Enables directory listings when index file not found
      #autoindex  on;
    
      # for wordpress super cache plugin
      #try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php?q=$uri&$args;
    
      # for wp cache enabler plugin
      try_files $cache_enabler_uri_webp $cache_enabler_uri $uri $uri/ $custom_subdir/index.php?$args; 
    
      # Wordpress Permalinks
      #try_files $uri $uri/ /index.php?q=$uri&$args;
    
      # Nginx level redis Wordpress
      # https://community.centminmod.com/posts/18828/
      #try_files $uri $uri/ /index.php?$args;
    
      }
    
    location ~* /(wp-login\.php) {
        limit_req zone=xwplogin burst=1 nodelay;
        #limit_conn xwpconlimit 30;
        auth_basic "Private";
        auth_basic_user_file /home/nginx/domains/wptest2.tk/htpasswd_wplogin;   
        include /usr/local/nginx/conf/php-wpsc.conf;
        
        # https://community.centminmod.com/posts/18828/
        #include /usr/local/nginx/conf/php-rediscache.conf;
    }
    
    location ~* /(xmlrpc\.php) {
        limit_req zone=xwprpc burst=45 nodelay;
        #limit_conn xwpconlimit 30;
        include /usr/local/nginx/conf/php-wpsc.conf;
        # https://jetpack.com/support/hosting-faq/
        include /usr/local/nginx/conf/jetpack_whitelist_ip.conf;
        
        # https://community.centminmod.com/posts/18828/
        #include /usr/local/nginx/conf/php-rediscache.conf;
    }
    
    location ~* /wp-admin/(load-scripts\.php) {
        limit_req zone=xwprpc burst=5 nodelay;
        #limit_conn xwpconlimit 30;
        include /usr/local/nginx/conf/php-wpsc.conf;
        
        # https://community.centminmod.com/posts/18828/
        #include /usr/local/nginx/conf/php-rediscache.conf;
    }
    
    location ~* /wp-admin/(load-styles\.php) {
        limit_req zone=xwprpc burst=5 nodelay;
        #limit_conn xwpconlimit 30;
        include /usr/local/nginx/conf/php-wpsc.conf;
        
        # https://community.centminmod.com/posts/18828/
        #include /usr/local/nginx/conf/php-rediscache.conf;
    }
    
      include /usr/local/nginx/conf/wpincludes/wptest2.tk/wpsecure_wptest2.tk.conf;
      include /usr/local/nginx/conf/php-wpsc.conf;
     
      # https://community.centminmod.com/posts/18828/
      #include /usr/local/nginx/conf/php-rediscache.conf;
      include /usr/local/nginx/conf/pre-staticfiles-local-wptest2.tk.conf;
      include /usr/local/nginx/conf/pre-staticfiles-global.conf;
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/drop.conf;
      #include /usr/local/nginx/conf/errorpage.conf;
      include /usr/local/nginx/conf/vts_server.conf;
    }
    Code:
    [22:16][root@main.testmeplz.tk ssl]# curl -I https://wptest2.tk/
    HTTP/1.1 200 OK
    Date: Thu, 22 Sep 2022 01:00:42 GMT
    Content-Type: text/html; charset=UTF-8
    Connection: keep-alive
    Vary: Accept-Encoding
    Link: <https://wptest2.tk/wp-json/>; rel="https://api.w.org/"
    X-Powered-By: centminmod
    X-Xss-Protection: 1; mode=block
    X-Content-Type-Options: nosniff
    CF-Cache-Status: DYNAMIC
    Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=%2Fjbc8o6ITPfRSUnTLagRSsJ%2FyNJn1orJoEw3inp9Ztc%2BLh%2B%2FhChWhaqw9j2jfWIdhi43o0eyMT1gygarU202dIyWop6FWOp3UO4vJSI2YxJAQVrxmEmjcLzjlWa5VrRIAUrzQbNepq9w"}],"group":"cf-nel","max_age":604800}
    NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
    Server: cloudflare
    CF-RAY: 74e71ae8ffbb8c17-EWR
    alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
    
    You have new mail in /var/spool/mail/root
    Code:
    [01:00][root@main.testmeplz.tk ssl]# curl -I https://www.wptest2.tk
    HTTP/1.1 301 Moved Permanently
    Date: Thu, 22 Sep 2022 01:01:55 GMT
    Content-Type: text/html; charset=UTF-8
    Connection: keep-alive
    X-Redirect-By: WordPress
    Location: http://wptest2.tk/
    X-Powered-By: centminmod
    X-Xss-Protection: 1; mode=block
    X-Content-Type-Options: nosniff
    CF-Cache-Status: DYNAMIC
    Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=FMPRCrMBYZDv0kgB7EwVCbHgUi1drd%2FuF1cSZZRWYkK508Vu2osLe7k4%2BUEdapt0j3Ls5%2FAGR67sAel72JNB%2BLx8pXXVAx2L%2F4%2F3WRbSZPD0xQ3C1b3f5RzqLuK74Umu3yZs1GG0agxScRP4oA%3D%3D"}],"group":"cf-nel","max_age":604800}
    NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
    Server: cloudflare
    CF-RAY: 74e71cb38a6e8cee-EWR
    alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
    Code:
    [01:01][root@main.testmeplz.tk ssl]# curl -I http://wptest2.tk
    HTTP/1.1 200 OK
    Date: Thu, 22 Sep 2022 01:52:06 GMT
    Content-Type: text/html; charset=utf-8
    Connection: keep-alive
    Last-Modified: Thu, 22 Sep 2022 01:48:45 GMT
    Vary: Accept-Encoding
    X-Powered-By: centminmod
    X-Xss-Protection: 1; mode=block
    X-Content-Type-Options: nosniff
    CF-Cache-Status: DYNAMIC
    Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=arayT3u%2FotptaFkAodcdaScPWVjjf7cgaU8dHwOZzWnd%2FpWGpEwe2KqaX%2BHGxGBPRgba5tRXia3nm1wrc3hT2a6IHOfvRmh1LbZeHluy6Cq2y3ctX1IEGxR55R0ZMfe48S72pWHX2HXT"}],"group":"cf-nel","max_age":604800}
    NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
    Server: cloudflare
    CF-RAY: 74e7663729421770-EWR
    alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
    Code:
    [01:52][root@main.testmeplz.tk ssl]# curl -I http://www.wptest2.tk
    HTTP/1.1 301 Moved Permanently
    Date: Thu, 22 Sep 2022 01:52:41 GMT
    Content-Type: text/html; charset=UTF-8
    Connection: keep-alive
    X-Redirect-By: WordPress
    Location: http://wptest2.tk/
    X-Powered-By: centminmod
    X-Xss-Protection: 1; mode=block
    X-Content-Type-Options: nosniff
    CF-Cache-Status: DYNAMIC
    Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=hJYjt4IxCdvL%2FroIL5%2BadROL9rOctK%2FLCpF1gsuem8K%2FP8ncORhCI7sUWSh%2FWXJXfKVuWTxUms5BDVzGVyuD00jcM%2B2m0souMCe2NGSDCxAxq8w73eeCkK33P%2BgBU4dyz8PxdKJwN7k25TdGHw%3D%3D"}],"group":"cf-nel","max_age":604800}
    NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
    Server: cloudflare
    CF-RAY: 74e7671489913342-EWR
    alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
     
  6. eva2000

    eva2000 Administrator Staff Member

    49,359
    11,306
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,591
    Local Time:
    8:22 AM
    Nginx 1.21.x
    MariaDB 10.x
    Not seeing anything that would cause the maintenance page to trigger but it I don't see the maintenance page but a 401 HTTP authentication password protected page for wp login URL. Is it when you log in pass the prompted user/password that you get the maintenance page?

    I see you have Cloudflare in front, make sure you're using Full SSL and not Flexible SSL for Cloudflare so Cloudflare talks with your HTTPS version site and Nginx vhost config at /usr/local/nginx/conf/conf.d/wptest2.tk.ssl.conf

    Also make sure that Wordpress site settings has default site set to HTTPS version of your domain address
     
  7. WaffleGerm

    WaffleGerm New Member

    5
    1
    3
    Sep 22, 2022
    Ratings:
    +1
    Local Time:
    6:22 PM
    1.21.6
    10
    Thank you so much for all your help. Turns out it was cloudflare and having "Flexible SSL"

    everything works now =)