Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Fri Oct 18, 2019 5:23 am


Username:
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
Font size:
 
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation code
Confirmation code:
In an effort to prevent automatic submissions, we require that you enter both of the words displayed into the text field underneath.
     

Topic review - Nginx + php-fpm increase upload_max_filesize and other php values per vhost
Author Message
Post subject: Nginx + php-fpm increase upload_max_filesize and other php values per vhost  |  Post Posted: Mon Jan 02, 2012 9:04 am
Recent version of PHP support the PHP_VALUE command for fcgi processes. This means that php ini directives can be configured for each Nginx virtual host individually.
The trick is that multiple values need to be set in one "fastcgi_param PHP_VALUE" directive with a newline character as separator otherwise only the last one will be used by the php process.







Configure php upload_max_filesize from nginx fastcgi parameters


The upload_max_filesize php ini configuration sets the maximum size of an uploaded file.
Example of increasing PHP's upload_max_filesize ini setting via Nginx web server:
Code:
    location ~ \.php$ {
      fastcgi_param PHP_VALUE "upload_max_filesize = 50M \n post_max_size=51M";
}


Below example is INCORRECT:
Code:
    location ~ \.php$ {
      fastcgi_param PHP_VALUE "upload_max_filesize = 50M";
      fastcgi_param PHP_VALUE "post_max_size=51M";
}
Jump to:  
News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]



phpBB SEO