[mpm-itk] ITK and php7+apache 2.4.25

ZNews znews at 13fr.com
Fri Jan 6 20:53:49 UTC 2017


Hi,

You can try this:

1. Create a php-fpm pool for each user you need:
- copy the default www config file /etc/php/7.0/fpm/pool.d/www.conf (path on my ubuntu 16.04 server)
- change the pool name at the top: [www] -> [newpoolname]
- set user and group as needed just few line below
- change the listen variable to a unique file for this pool /run/php/php7.0-fpm.sock -> /run/php/php7.0-fpm_newpoolname.sock
-  at the end of the config file, set the php settings you need:
php_admin_value[doc_root] = "/home/hosting/re.pt/"
php_admin_value[open_basedir] = "/home/hosting/re.pt/:/tmp/:/usr/share/php/"

2. Update your vhost config to use new pool
<IfModule mod_fastcgi.c>
         Alias /php7-fcgi /usr/lib/cgi-bin/php7-fcgi-newpoolname
         FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi-newpoolname -socket /var/run/php/php7.0-fpm_newpoolname.sock -pass-header Authorization
         <Directory /usr/lib/cgi-bin>
             Require all granted
         </Directory>
     </IfModule>

3. restart php-fpm and apache2


I'm using mpm_itk on a multi-user server, however I'm using this kind of configuration with mpm-event, not itk.

To use with itk, you might want to match your cgi proxy rather than my mod_fastcgi.


.Alex.

Le 06/01/2017 à 17:51, Jorge Bastos a écrit :
> Hi Steiner,
>
>>> Any idea where should I start? I havent changed my configuration.
>> PHP shows the wrong value for uid/gid. Verify that you are _actually_
>> running as the user you think you are.
>>
> My real issue is what i said in the previous email,
> I'm running some vhosts with php fpm, and since fpm run's with just one user
> it was running with www-data default webserver's user.
>
> Question is, can I tell fpm to use the itk inside FilesMatch?
> I think no but if you can confirm
>
>
> my vhost is:
>
> <VirtualHost *:80>
>          AssignUserID #5015 #5000
>          ServerName  re.pt
>          ServerAlias www.re.pt
>
>          <FilesMatch \.php$>
>                  SetHandler "proxy:fcgi://127.0.0.1:9056"
>         </FilesMatch>
>
>          php_admin_value open_basedir
> /home/hosting/re.pt/:/tmp/:/usr/share/php/
>          php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f
> re.pt at fastweb.dal.pt"
>          php_admin_value session.save_path /tmp/
>
> etc etc
>
>
> _______________________________________________
> mpm-itk mailing list
> mpm-itk at err.no
> http://lists.err.no/mailman/listinfo/mpm-itk





More information about the mpm-itk mailing list