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.

httpd.conf virtual hosts only includes std config settings not ssl

Discussion in 'General Discussion' started by mobcdi, May 10, 2011.

  1. mobcdi

    mobcdi Well-Known Member

    Joined:
    Jul 13, 2009
    Messages:
    109
    Likes Received:
    0
    Trophy Points:
    16
    I followed Changes Contained within a VirtualHost Directive to allow me create custom virtual host configurations for apache 2 based on using the account and domain names to create a particular folder structure and adding a conf file in the correct place but only the http include(s) seem to get added to the httpd.conf file under the relevant virtual host section.

    Also when I view the domain corresponding to the virtual host on http I get the content from the file manager but if i use https i get the cpanel success holding page defaultwebpage.cgi

    Any suggestions as to whats happening?
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello mobcdi,

    You will need to show us the configuration changes you are talking about specifically as I'm a bit lost as to what you've done precisely.

    Thanks!
     
  3. mobcdi

    mobcdi Well-Known Member

    Joined:
    Jul 13, 2009
    Messages:
    109
    Likes Received:
    0
    Trophy Points:
    16
    I created the following folder structure but substituted $user, $domain and $includename with the necessary values relevant to my cPanel username, my domain and my conf file so the include files will get added to the httpd.conf file managed by cpanel

    Apache 2 with SSL — /usr/local/apache/conf/userdata/ssl/2/$user/$domain/$includename.conf
    Apache 2 without SSL — /usr/local/apache/conf/userdata/std/2/$user/$domain/$includename.conf

    The conf files I want included tell apache to load a module and if I visit http (non ssl) version of the domain the necessary module is invoked as needed and the default.html file i added to the webroot is also loaded

    The problem is that if I use the https (ssl) version of the domain address I get the default cpanel holding page defaultwebpage.cgi which says "Great Success !Apache is working on your cPanel® and WHM™ Server" instead of showing me the default.html file I know is in the webroot.

    If I view the httpd.conf file and go to the relevant virtual host section I can see its configured to look in ..userdata/std/2/$user/$domain/ for *.conf but the only entry in the httpd.conf file /ssl/ is the virtual host entry for the hosts IP address
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Which commands did you run upon adding the includes to incorporate them into httpd.conf file? Please provide all commands used upon creating the include files to see what was processed.
     
  5. mobcdi

    mobcdi Well-Known Member

    Joined:
    Jul 13, 2009
    Messages:
    109
    Likes Received:
    0
    Trophy Points:
    16
    As per the document I used

    /scripts/verify_vhost_includes

    /scripts/ensure_vhost_includes --user=$username

    /scripts/ensure_vhost_includes --all-users

    and got either Apache successfully restarted message or "Ok" message for each.

    The host and the domains share the same IP address and the virtual host for IPAddress:443 is the only place in httpd.conf where /userdata/ssl/2 is checked for conf files to include but no entry exists in that list for /$user/$domain/$includename.conf
     
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    When I tested this on my machine, I was able to get the ssl entries to add as includes rather than only the std entries. In /usr/local/apache/conf/httpd.conf, the following includes appears upon running "/scripts/ensure_vhost_includes --user=t3st" where t3st was the cPanel username for the account:

    These all added after the </Directory> tag, but before the </VirtualHost> tag for the https entry for that domain.

    Since this is not working for you, please open up a ticket if nothing is logging to /usr/local/cpanel/logs/error_log location.
     
Loading...

Share This Page