Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Question about mod_fcgid FastCgi

Discussion in 'General Discussion' started by ITGabs, Oct 11, 2013.

  1. ITGabs

    ITGabs Well-Known Member

    Joined:
    Jul 30, 2013
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hi,

    I have many question about mod_fcgid related to Cpanel configurations but the principal one is

    How can I have different fcgid values per user/account/site?

    I need to have different values per user for these fast cgi parameters
    mod_fcgid - Apache HTTP Server
    mod_fcgid - Apache HTTP Server

    actually fcgidoutputbuffersize is great to test if the values are working or not

    I did some experiments
    in my php.conf (I left the # just for safe copy paste and test)

    Code:
    LoadModule fcgid_module modules/mod_fcgid.so
    #<If "$req{Host} != 'www.ecuadorbeaches.org'">
    #    FcgidOutputBufferSize 0
    #</If>
    #<Directory "/home/ecuadorb/public_html/webcams">
    #    FcgidOutputBufferSize 0
    #</Directory>
    
    but these two sentences produce different errors after
    Code:
    service httpd restart
    in my fcgid wrapper I tried this (that should be perfect)

    Code:
    itgadd=' -d noflag ';
    #source $dir/incl.sh
    [[ -f ~/php.flag ]] && itgadd=" -d file=$0:$1:$2:$3:$4";
    [[ -f ~/php.conf ]] && source ~/php.conf
    [[ -f ~/php.ini ]] && exec /usr/bin/php -c ~/php.ini -d wrapper3 $itgadd
    [[ -f ~/public_html/php.ini ]] && exec /usr/bin/php -c ~/public_html/php.ini -d wrapper2 $itgadd
    exec /usr/bin/php -d wrapper1 $itgadd
    where [[ -f ~/php.conf ]] && source ~/php.conf is the line that should load or include the fcgid settings if the file exists but this file should be included outside the wrapper I guess.

    Other of my questions is how can I see after a "ps aux" what script is being executed
    I am trying to add manually in the wrapper [[ -f ~/php.flag ]] && itgadd=" -d file=$0:$1:$2:$3:$4"; but it only show php5::::

    I hope is easy to understand
    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. ITGabs

    ITGabs Well-Known Member

    Joined:
    Jul 30, 2013
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    I am a bit closer

    I edited the
    /usr/local/apache/conf/httpd.conf
    for example
    Code:
    ...
    <VirtualHost 108.170.13.6:80>
        ServerName itgabs.com
        ServerAlias www.itgabs.com
        DocumentRoot /home/itgc0034/public_html
        UseCanonicalName Off
            Options -ExecCGI -Includes
            RemoveHandler cgi-script .cgi .pl .plx .ppl .perl
    
        ## User itgc0034 # Needed for Cpanel::ApacheConf
        UserDir disabled
        UserDir enabled itgc0034
    
    <IfModule mod_fcgid.c>
    FcgidOutputBufferSize 100
    </IfModule>
    ...
      
    
    and in another 
    <IfModule mod_fcgid.c>
    FcgidOutputBufferSize 0
    </IfModule>
    
    after a service httpd restart the two sites work with different buffer settings

    I am testing with Chrome default settings and with a php script like this one (must work good with a default php.ini)

    PHP:
    <?php
    $end
    =($start+200);
            
    header("Content-type: text/html");
            for(
    $cwb=$start$cwb<=$end$cwb++) {
                
                echo 
    '<b>'.$cwb.'</b>'."\n";
                
    //echo "<img src=\"data:image/jpeg;base64,".$image."\" alt=\"".$cwb."\" >\r\n";
                
    flush();
                
    ob_flush();
                
    usleep(100000);
            }    

    ?>
    In itgabs.com I can see the numbers coming on the fly but and in the another in blocks of 100 bytes.

    So my question now is "how can I include a apache conf per user/virtualhost that can read the ~fcgid.conf so special accounts have different fastcgi settings?"
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,563
    Likes Received:
    42
    Trophy Points:
    308
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice