Mention how to change upload size in Nginx.

This commit is contained in:
Zhang Huangbin 2015-03-23 21:15:15 +08:00
parent a588b5046f
commit b1dcfc927b
4 changed files with 46 additions and 17 deletions

View File

@ -32,9 +32,9 @@ __NOTES__:
If you use mail clients such as Outlook, thunderbird to send mails, it's now
ok to sent large attachment with above setting.
## Change upload file size in webmail
## Change upload file size in Roundcube webmail
If you have webmail, you have to change two more settings:
If you have Roundcube webmail, please change two more settings:
### Change PHP setting to allow to upload large attachment
@ -63,6 +63,9 @@ Change same settings in file `.htaccess` under roundcube root directory:
* on FreeBSD, it's `/usr/local/www/roundcubemail/.htaccess`
* on OpenBSD, it's `/var/www/roundcubemail/.htaccess`
Note: this `.htaccess` file may not exist on some Linux/BSD distributions,
if it doesn't exist, you can skip this step.
```
php_value memory_limit 200M
php_value upload_max_filesize 100M
@ -70,3 +73,15 @@ php_value post_max_size 100M
```
Restart Apache or Nginx web server to make it work.
## Change upload size in Nginx
Find setting `client_max_body_size` in Nginx config file
`/etc/nginx/nginx.conf`, change it to a proper value to match your need.
```
http {
...
client_max_body_size 100m;
...
}

View File

@ -15,11 +15,12 @@
<ul>
<li><a href="#change-mail-attachment-size">Change mail attachment size</a><ul>
<li><a href="#change-message-size-limit-in-postfix">Change message size limit in postfix</a></li>
<li><a href="#change-upload-file-size-in-webmail">Change upload file size in webmail</a><ul>
<li><a href="#change-upload-file-size-in-roundcube-webmail">Change upload file size in Roundcube webmail</a><ul>
<li><a href="#change-php-setting-to-allow-to-upload-large-attachment">Change PHP setting to allow to upload large attachment</a></li>
<li><a href="#change-roundcube-webmail-settings-to-allow-large-attachment">Change Roundcube webmail settings to allow large attachment</a></li>
</ul>
</li>
<li><a href="#change-upload-size-in-nginx">Change upload size in Nginx</a></li>
</ul>
</li>
</ul>
@ -46,8 +47,8 @@ like below:</p>
</ul>
<p>If you use mail clients such as Outlook, thunderbird to send mails, it's now
ok to sent large attachment with above setting.</p>
<h2 id="change-upload-file-size-in-webmail">Change upload file size in webmail</h2>
<p>If you have webmail, you have to change two more settings:</p>
<h2 id="change-upload-file-size-in-roundcube-webmail">Change upload file size in Roundcube webmail</h2>
<p>If you have Roundcube webmail, please change two more settings:</p>
<h3 id="change-php-setting-to-allow-to-upload-large-attachment">Change PHP setting to allow to upload large attachment</h3>
<p>You should change <code>memory_limit</code>, <code>upload_max_filesize</code> and <code>post_max_size</code> in
PHP config file <code>/etc/php.ini</code></p>
@ -72,12 +73,23 @@ post_max_size = 100M;
<li>on FreeBSD, it's <code>/usr/local/www/roundcubemail/.htaccess</code></li>
<li>on OpenBSD, it's <code>/var/www/roundcubemail/.htaccess</code></li>
</ul>
<p>Note: this <code>.htaccess</code> file may not exist on some Linux/BSD distributions,
if it doesn't exist, you can skip this step.</p>
<pre><code>php_value memory_limit 200M
php_value upload_max_filesize 100M
php_value post_max_size 100M
</code></pre>
<p>Restart Apache or Nginx web server to make it work.</p><p style="text-align: center; color: grey;">Document published under a <a href="http://creativecommons.org/licenses/by-nd/3.0/us/" target="_blank">CC BY-ND 3.0</a> license. If you found something wrong, please do <a href="http://www.iredmail.org/contact.html">contact us</a> to fix it.<script>
<p>Restart Apache or Nginx web server to make it work.</p>
<h2 id="change-upload-size-in-nginx">Change upload size in Nginx</h2>
<p>Find setting <code>client_max_body_size</code> in Nginx config file
<code>/etc/nginx/nginx.conf</code>, change it to a proper value to match your need.</p>
<p>```
http {
...
client_max_body_size 100m;
...
}</p><p style="text-align: center; color: grey;">Document published under a <a href="http://creativecommons.org/licenses/by-nd/3.0/us/" target="_blank">CC BY-ND 3.0</a> license. If you found something wrong, please do <a href="http://www.iredmail.org/contact.html">contact us</a> to fix it.<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)

View File

@ -85,18 +85,18 @@ sql&gt; UPDATE mailbox SET password='{SSHA512}FxgXDhBVYmTqoboW+ibyyzPv/wGG7y4VJt
<h3 id="for-ldap-backends">For LDAP backends</h3>
<p>User password is stored in attribute <code>userPassword</code> of user object.</p>
<ul>
<li>
<p>To store plain password, SSHA, SSHA512 password hash, just store them in
original format. For example:
<code>userPassword: 123456
<li>To store plain password, SSHA, SSHA512 password hash, just store them in
original format. For example:</li>
</ul>
<pre><code>userPassword: 123456
userPassword: {SSHA}OuCrqL2yWwQIu8a9uvyOQ5V/ZKfL7LJD
userPassword: {SSHA512}FxgXDhBVYmTqoboW+ibyyzPv/wGG7y4VJtuHWrx+wfqrs/lIH2Qxn2eA0jygXtBhMvRi7GNFmL++6aAZ0kXpcy1fxag=</code></p>
</li>
<li>
<p>To store standard MD5 password (salted MD5 hash), please prepend <code>{CRYPT}</code>
userPassword: {SSHA512}FxgXDhBVYmTqoboW+ibyyzPv/wGG7y4VJtuHWrx+wfqrs...
</code></pre>
<ul>
<li>To store standard MD5 password (salted MD5 hash), please prepend <code>{CRYPT}</code>
(case insensitive) in your password hash. For example:
<code>userPassword: {CRYPT}$1$GfHYI7OE$vlXqMZSyJOSPXAmbXHq250</code></p>
</li>
<code>userPassword: {CRYPT}$1$GfHYI7OE$vlXqMZSyJOSPXAmbXHq250</code></li>
</ul>
<p><strong>IMPORTANT NOTE</strong>: If you want to input password hash with phpLDAPadmin,
please choose <code>clear</code> in the password hash list, then input password hash.</p>

View File

@ -77,10 +77,12 @@ User password is stored in attribute `userPassword` of user object.
* To store plain password, SSHA, SSHA512 password hash, just store them in
original format. For example:
```
userPassword: 123456
userPassword: {SSHA}OuCrqL2yWwQIu8a9uvyOQ5V/ZKfL7LJD
userPassword: {SSHA512}FxgXDhBVYmTqoboW+ibyyzPv/wGG7y4VJtuHWrx+wfqrs/lIH2Qxn2eA0jygXtBhMvRi7GNFmL++6aAZ0kXpcy1fxag=```
userPassword: {SSHA512}FxgXDhBVYmTqoboW+ibyyzPv/wGG7y4VJtuHWrx+wfqrs...
```
* To store standard MD5 password (salted MD5 hash), please prepend `{CRYPT}`
(case insensitive) in your password hash. For example: