This page is READ-ONLY. It is generated from the old site.
All timestamps are relative to 2013 (when this page is generated).
If you are looking for TeX support, please go to VietTUG.org

php-fpm: per-{host,dir} settings

it's simple
Added by icy 8 months ago  »  Votes: 3/3

There are some ways to support per-{host,dir} settings. If you are using php-fpm (php 5.3 or later), you can use the Section directory PATH and HOST with some arguments

1 [PATH=/path/to/foobar.example.com/]
2 allow_url_fopen = On
3 
4 [HOST=foobar.example.net]
5 post_max_size = 35M
6 upload_max_filesize = 30M

When using PATH, you must specify a directory. The feature doesn't support recurse option, so it's a bit hard if you have some directories to play. Because it affects all *.php files in the same folder, you may need to put some special script in another folder.

Please note that in a trivial file php.ini, the section name [PHP], [MySQL] means nothing: they are used to make the configuration file clear. But you've seen two sections that're meanful


Comments