Discover Centmin Mod today
Register Now

Wordpress 403 forbidden

Discussion in 'Blogs & CMS usage' started by elargento, Jul 31, 2017.

  1. elargento

    elargento Member

    293
    16
    18
    Jan 4, 2016
    Ratings:
    +39
    Local Time:
    4:21 PM
    10
    Moved Wordpress from another server not nginx.
    WP-cache is disabled in wp-config.
    I was going to install letencrypt but then I read the acme script creates the vhost file so I deleted the vhost file:

    [root@1 addons]# rm -rf /usr/local/nginx/conf/conf.d/domain.com.conf
    [root@1 addons]# rm -rf /usr/local/nginx/conf/conf.d/domain.com.ssl.conf (just in case)

    Now, before proceeding I'd like to get rid of the 403 error. Is there any place where I can find out what's going on?
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    5:21 AM
    Nginx 1.13.x
    MariaDB 5.5
  3. elargento

    elargento Member

    293
    16
    18
    Jan 4, 2016
    Ratings:
    +39
    Local Time:
    4:21 PM
    10
  4. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    5:21 AM
    Nginx 1.13.x
    MariaDB 5.5
    check nginx vhost access and error log for clues on 404 error
     
  5. elargento

    elargento Member

    293
    16
    18
    Jan 4, 2016
    Ratings:
    +39
    Local Time:
    4:21 PM
    10
    OK...started from fresh
    Generate Centmin Mod Nginx Vhost - CentminMod.com LEMP Nginx web stack for CentOS http2

    I have Wordpress on /domain.com/wp folder. I'm getting a 500 server error (in WP folder only), I think I have to modify vhost file and update the path where Wordpress is located so I did it but still getting the 500 error

    error logs
    Code:
    2017/08/01 01:15:01 [error] 28741#28741: *12 FastCGI sent in stderr: "PHP message: PHP Warning:  Unknown: failed to open stream: No such file or directory in Unknown on line 0
    PHP message: PHP Warning:  Unknown: failed to open stream: No such file or directory in Unknown on line 0
    PHP message: PHP Fatal error:  Unknown: Failed opening required '/home/domain/public_html/en/wordfence-waf.php' (include_path='.:/usr/local/lib/php') in Unknown on line 0" while reading response header from upstream, client: 201.231.89.72, server: domain.com, request: "GET /en/ HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "domain.com"
    
    I don't get why I'm getting errors related to the old cPanel path, I already deleted wordfence plugin and don't know where else to look for a solution
     
  6. elargento

    elargento Member

    293
    16
    18
    Jan 4, 2016
    Ratings:
    +39
    Local Time:
    4:21 PM
    10
    Honestly eva I do all the possible to resolve the issues myself. I already did that, deleted all plugins and more.
    I noticed there is a html file I'm trying to load insiede the wordpress folder but I'm getting a 403 forbidden error. Ownership and chmod are ok

    Code:
    2017/08/01 22:00:30 [error] 30618#30618: *71 access forbidden by rule, client: 25.18.29.186, server: domain.com, request: "GET /wordpress/readme.html HTTP/2.0", host: "www.domain.com"
    2017/08/01 22:01:08 [error] 30618#30618: *71 access forbidden by rule, client: 25.18.29.186, server: domain.com, request: "GET /wordpress/readme.html HTTP/2.0", host: "www.domain.com"
    2017/08/01 22:06:29 [error] 7445#7445: *1 access forbidden by rule, client: 25.18.29.186, server: domain.com, request: "GET /wordpress/readme.html HTTP/2.0", host: "www.domain.com"
    2017/08/01 22:06:30 [error] 7445#7445: *1 access forbidden by rule, client: 25.18.29.186, server: domain.com, request: "GET /wordpress/readme.html HTTP/2.0", host: "www.domain.com"
    2017/08/01 22:07:28 [error] 7444#7444: *5 access forbidden by rule, client: 25.18.29.186, server: domain.com, request: "GET /wordpress/readme.html HTTP/2.0", host: "www.domain.com"
    2017/08/01 22:07:44 [error] 7445#7445: *11 access forbidden by rule, client: 25.18.29.186, server: domain.com, request: "GET /wordpress/readme.html HTTP/2.0", host: "www.domain.com"
    EDIT: vhost file was wrong, finally fixed it after 2 hours :poop:
     
    Last edited: Aug 2, 2017
    • Informative Informative x 1
  7. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    5:21 AM
    Nginx 1.13.x
    MariaDB 5.5
    what was the boo boo ?
     
  8. elargento

    elargento Member

    293
    16
    18
    Jan 4, 2016
    Ratings:
    +39
    Local Time:
    4:21 PM
    10
    Rules set for WP plugins not installed in the site I moved
     
    • Informative Informative x 1