The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Apache Error on new install: File does not exist: /var/www/html/wp-cron.php

Discussion in 'General Discussion' started by GTMAN, Jul 26, 2016.

Tags:
  1. GTMAN

    GTMAN Member

    Joined:
    Mar 5, 2013
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I have multiple WordPress sites on a new WHM Installation on top of Centos 7 at Linode.com

    The apache error log is filled with

    [Tue Jul 26 12:55:03.306183 2016] [:error] [pid 11784:tid 140346126178048] [client 2600:3c03::f03c:91ff:fe79:6c48:38154] File does not exist: /var/www/html/wp-cron.php

    I've tried modifying the Hosts file with no affect. All the sites run fine but why the error. Also whats with the client id? Shouldn't it be an IP address?


    I had the same setup on a Digital Ocean droplet with no such errors and used the Transfer Tool to move the sites.

    Any help is most appreciated!

    GT
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    The path you are using is not valid with cPanel. The document root should look like this example:

    Code:
    /home/$username/public_html/wp-path/wp-cron.php
    Note that if you have uploaded files to public_html directly, then "wp-path" is not required. Please ensure to update the configuration of your PHP applications to use the correct document root.

    Thank you.
     
  3. GTMAN

    GTMAN Member

    Joined:
    Mar 5, 2013
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks for the reply!

    The document root for the <VirtualHost> entries are as you say. The issue seems to be that when WordPress fires the call to wp-cron.php it doesn't know the path and defaults to the vhost for unbound IPs document root or vhosts for shared IPs?

    `
    Code:
    ##################################################
    ##################################################
    #
    # Define default vhosts for unbound IPs
    #
    ##################################################
    ##################################################
    
    <VirtualHost *>
        ServerName do.example.ca
        DocumentRoot /var/www/html
        ServerAdmin xxxxxx@gmail.com
    
        <IfModule suphp_module>
            suPHP_UserGroup nobody nobody
        </IfModule>
    
    </VirtualHost>
    
    ##################################################
    ##################################################
    #
    # Define the virtual host configurtion for user domains
    #
    ##################################################
    ##################################################
    
    # BEGIN: HTTP vhosts list
    
    <VirtualHost 159.203.xx.xx:80>
      ServerName chsa.ca
      ServerAlias www.example.ca
      DocumentRoot /home/someusr/public_html
      ServerAdmin webmaster@example.ca
      UseCanonicalName Off
      CustomLog /etc/apache2/logs/domlogs/example.ca combined
      <IfModule log_config_module>
        <IfModule logio_module>
          CustomLog /etc/apache2/logs/domlogs/example.ca-bytes_log "%{%s}t %I .\n%{%s}t %O ."
        </IfModule>
      </IfModule>
      ## User chsa # Needed for Cpanel::ApacheConf
      <IfModule userdir_module>
        <IfModule !mpm_itk.c>
          <IfModule !ruid2_module>
            UserDir enabled chsa
          </IfModule>
        </IfModule>
      </IfModule>
    
      # Enable backwards compatible Server Side Include expression parser for Apache versions >= 2.4.
      # To selectively use the newer Apache 2.4 expression parser, disable SSILegacyExprParser in
      # the user's .htaccess file.  For more information, please read:
      #    mod_include - Apache HTTP Server Version 2.4
      <IfModule include_module>
        <Directory "/home/someusr/public_html">
          SSILegacyExprParser On
        </Directory>
      </IfModule>
    
      <IfModule suphp_module>
        suPHP_UserGroup someusr someusr
      </IfModule>
      <IfModule suexec_module>
        <IfModule !mod_ruid2.c>
          SuexecUserGroup someusr someusr
        </IfModule>
      </IfModule>
      <IfModule ruid2_module>
        RMode config
        RUidGid someusr someusr
      </IfModule>
      <IfModule mpm_itk.c>
        # For more information on MPM ITK, please read:
        #   apache2-mpm-itk
        AssignUserID someusr someusr
      </IfModule>
    
      <IfModule alias_module>
        ScriptAlias /cgi-bin/ /home/someusr/public_html/cgi-bin/
      </IfModule>
    
      # To customize this VirtualHost use an include file at the following location
      # Include "/etc/apache2/conf.d/userdata/std/2_4/someuser/example.ca/*.conf"
    </VirtualHost>
    `
    
     
    #3 GTMAN, Jul 26, 2016
    Last edited by a moderator: Jul 27, 2016
  4. GTMAN

    GTMAN Member

    Joined:
    Mar 5, 2013
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Upon further research I realize the Client is an IP v 6. How do I get WHM to add both ip4 and ip6 to the vhosts entries in the conf file?
     
  5. GTMAN

    GTMAN Member

    Joined:
    Mar 5, 2013
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Solved by adding the ipv6 to the Tweak> settings>system and the hosts file.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I'm happy to see you were able to address the issue. Thank you for updating us with the outcome.
     
Loading...

Share This Page