Page 1 of 1

FCGIWrapper

Posted: Sun Aug 02, 2015 11:46 pm
by mestresan
When setup fcgi in apache (vestacp) ... the php_admin_value / php_value / open_basedir and other lines in httpd.conf dont work ...

why ?

when I tested removing the lines :
<Files *.php>
SetHandler fcgid-script
</Files>
FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php

work fine the rules... rules like example:
php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube


WHY ?

Re: FCGIWrapper

Posted: Tue Aug 11, 2015 10:55 pm
by skurudo
mestresan wrote:When setup fcgi in apache (vestacp) ... the php_admin_value / php_value / open_basedir and other lines in httpd.conf dont work ...why ?
Your configs for user not in httpd.conf. You can put there whatever you want, domain config too, but there is different files for that.

EXAMPLE from admin - /home/admin/conf/web/apache2.conf
php_admin_value open_basedir /home/admin/web/erza.ru/public_html:/home/admin/tmp
php_admin_value upload_tmp_dir /home/admin/tmp
php_admin_value session.save_path /home/admin/tmp

Re: FCGIWrapper

Posted: Wed Aug 12, 2015 6:25 pm
by mestresan
fine.. and how to generate automatic link httpd.conf with vars like %user% etc.... ?

Re: FCGIWrapper

Posted: Fri Aug 14, 2015 3:49 pm
by skurudo
mestresan wrote:fine.. and how to generate automatic link httpd.conf with vars like %user% etc.... ?
When you add new domain or make rebuild web, VestaCP use templates.
Templates from - /usr/local/vesta/data/templates/web/apache2/ (or httpd)

Re: FCGIWrapper

Posted: Fri Aug 14, 2015 5:55 pm
by mestresan
yes I know...
but putting this lines in template, when using fcgi, dont respect
work when NOT using fcgi ....

using fcgi, this use only php.ini default vars

Re: FCGIWrapper

Posted: Fri Aug 14, 2015 5:57 pm
by mestresan
<VirtualHost %ip%:%web_port%>

ServerName %domain_idn%
%alias_string%
ServerAdmin %email%
DocumentRoot %docroot%
ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
Alias /vstats/ %home%/%user%/web/%domain%/stats/
Alias /error/ %home%/%user%/web/%domain%/document_errors/
SuexecUserGroup %user% %group%
CustomLog /var/log/httpd/domains/%domain%.bytes bytes
CustomLog /var/log/httpd/domains/%domain%.log combined
ErrorLog /var/log/httpd/domains/%domain%.error.log

<Directory %docroot%>
AllowOverride All
Options +Includes -Indexes +ExecCGI

<Files *.php>
SetHandler fcgid-script
</Files>
FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php

php_admin_value upload_tmp_dir /dev/shm/nginx/temp
php_admin_flag mysql.allow_persistent off
php_admin_flag safe_mode off
php_admin_value session.save_path /dev/shm/nginx/temp
php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%'

</Directory>

<Directory %home%/%user%/web/%domain%/stats>
AllowOverride All
</Directory>

Include %home%/%user%/conf/web/httpd.%domain%.conf*

</VirtualHost>

Re: FCGIWrapper

Posted: Fri Aug 14, 2015 10:41 pm
by skurudo
mestresan wrote: but putting this lines in template, when using fcgi, dont respect
using fcgi, this use only php.ini default vars
It'll be nice soon, when php-fpm appear ;-)