Welcome! Log In Create A New Profile

Advanced

Re: php.ini & Virtual Hosts

Reinis Rozitis
November 23, 2011 08:40AM
> Is it possible to define a php.ini file per virtual host. If so, how can it be done? Thanks.

To actually use different php.ini files you will have to spawn seperate php processes but you can achieve different settings for
each virtualhost using a single php.ini file:

1. You can use the [HOST=yourvirtualhost] ( http://php.net/manual/en/ini.sections.php ) approach and define the settings directly in
php.ini
2. You can make multiple pools in the FPM configuration ( http://php.net/manual/en/install.fpm.configuration.php ) and change the
settings via php_flag / php_admin_value etc directives
3. You can pass the config changes also from nginx using fastcgi_param PHP_VALUE ...
4. Can also use the .user.ini approach http://www.php.net/manual/en/configuration.file.per-user.php

rr

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

php.ini & Virtual Hosts

parkerj November 23, 2011 08:22AM

Re: php.ini & Virtual Hosts

Reinis Rozitis November 23, 2011 08:40AM

Re: php.ini & Virtual Hosts

parkerj November 23, 2011 09:00AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 262
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready