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.

Need help with new Apache include system

Discussion in 'EasyApache' started by sneader, Jan 12, 2008.

  1. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    I used shared SSL for my customers that want SSL for their web site, without them having to buy a certificate.

    So, for example, if their home directory is:

    /home/customer/

    and my server hostname, which has a valid SSL cert, is www4.webhost.com

    Then the customer can use this as their SSL URL:

    https://www4.webhost.com/~customer/

    The problem is, after upgrading to cPanel 11, the new httpd.conf file removes CGI capabilities, which now has broken all my shopping carts, as they transform from http to the shared https URL. Here is the part of httpd.conf that is broken:

    (in this example, 123.123.123.123 is the main IP for my site, and www4.webhost.com is the hostname of my web server)


    <VirtualHost 123.123.123.123:443>
    ServerName www4.webhost.com
    ServerAlias www.www4.webhost.com
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin webmaster@www4.webhost.com
    UseCanonicalName Off
    <IfModule !mod_disable_suexec.c>
    User nobody
    Group nobody
    </IfModule>
    Options -ExecCGI -Includes
    RemoveHandler cgi-script .cgi .pl .plx .ppl .perl
    CustomLog /usr/local/apache/domlogs/www4.webhost.com combined
    BytesLog /usr/local/apache/domlogs/www4.webhost.com-bytes_log
    <IfModule concurrent_php.c>
    php4_admin_value open_basedir
    "/:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
    php5_admin_value open_basedir
    "/:/usr/lib/php:/usr/local/lib/php:/tmp"
    </IfModule>
    <IfModule !concurrent_php.c>


    I have tried to delete the "RemoveHandler cgi-script .cgi .pl .plx .ppl .perl" line, then I did:

    /usr/local/cpanel/bin/apache_conf_distiller --update

    Then I did

    /usr/local/cpanel/bin/build_apache_conf

    But the changes are wiped out!

    I understand we have the Include Editor now, and we have three choices... pre
    main.. pre virtual host... and post virtual host.

    But this entry IS a virtual host. Where can I fix this, and have the change
    actually saved?

    - Scott
     
  2. grindlay

    grindlay Active Member

    Joined:
    Dec 8, 2004
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Edinburgh, Scotland
    cPanel Access Level:
    Root Administrator
    Hi
    Did you try creating a custom user.conf file :
    /usr/local/apache/conf/userdata/ssl/2/<customer>/<domain>/user.conf
    In there you can specify:

    <Directory "/home/customer/<dir_for_cgi>">
    Options ExecCGI
    </Directory>

    If you don't already have something like this in your <VirtualHost> entries in httpd.conf:

    Include "/usr/local/apache/conf/userdata/std/2/*.conf"

    Then just manually add:

    Include "/usr/local/apache/conf/userdata/ssl/2/<customer>/<domain>/user.conf"

    Run the distiller again and it should populate all your VHost entries with Includes like the one above. (at least it did on my system).

    Restart apache for changes to take effect.
    I had exact same problem, although it was with PERL-based cPSupport tool.
     
    #2 grindlay, Jan 13, 2008
    Last edited: Jan 13, 2008
  3. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    Hmmm... this isn't for a user, this is for the hostname of the server. There is already a VirtualHost entry for the server itself, but cPanel thinks that it should not have CGI priviledges, so it puts a RemoveHandler line in there (see my original post).

    FYI, I do not have a /usr/local/apache/conf/userdata/ directory. I am still on Apache 1.3.39, perhaps upgrading to Apache 2 will solve this.

    - Scott

    cPanel ticket #232337
     
  4. grindlay

    grindlay Active Member

    Joined:
    Dec 8, 2004
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Edinburgh, Scotland
    cPanel Access Level:
    Root Administrator
    AFAIK, Easyapache doesn't create the /userdata/.. folders, that has to be done manually.

    I see what you mean about the <VirtualHost> being the IP of the server, rather than individual hosted accounts.
    Would be interested to hear the solution on this one.
     
    #4 grindlay, Jan 13, 2008
    Last edited: Jan 13, 2008
  5. jack01

    jack01 Well-Known Member

    Joined:
    Jul 21, 2004
    Messages:
    200
    Likes Received:
    0
    Trophy Points:
    16
    Can anyone answer WHY RemoveHandler is being set by cPanel in SOME of the VirtualHost sections of httpd.conf and thereby breaking some SSL shopping cart checkouts etc.??? Why is it suddenly and seemingly randomly assuming that cgi or perl should no longer be parsed for there virstualhosts????
     
    #5 jack01, Mar 28, 2008
    Last edited: Mar 31, 2008
  6. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    Make sure the package that you are setting them up with has the HAS CGI checkbox enabled.

    - Scott
     
  7. jack01

    jack01 Well-Known Member

    Joined:
    Jul 21, 2004
    Messages:
    200
    Likes Received:
    0
    Trophy Points:
    16
    Yes, all my packages have always had 'HAS CGI' enabled, an this seems to have started since I used EA3 about 10 days ago.
     
Loading...

Share This Page