Author Topic: Tinycp-Roundcube Server error for attachments larger than 1Mb  (Read 480 times)

Offline xfull

  • Newbie
  • *
  • Posts: 2
I have installed tinycp on my vps and then install application Roundcube for the mail box and I have configured everything correctly and it works fine but attachments larger than 1Mb get server error in Roundcube

I have added this line "$config['max_message_size'] = '25M';" to /var/www/mail.server.com/program/lib/Roundcube/rcube_config.php and rcube.php but the error still exists
then I add these configs below to /var/www/mail.server.com/.htaccess :
  php_value   upload_max_filesize   50M
  php_value   post_max_size   50M
  php_value   memory_limit   512M
then I saw "Maximum allowed file size is 50 MB" in attachment section but still I had server error for files larger than 1Mb so I updated mentioned configs in php.ini file located in /etc/php/7.4/fpm/ but still I have server error
also got this in console when server error appears:
Failed to load resource: the server responded with a status of 413 ()

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Re: Tinycp-Roundcube Server error for attachments larger than 1Mb
« Reply #1 on: March 24, 2024, 02:02:30 PM »
If your using php-fpm you should make sure that the proxy server (most likely nginx) also allows for large files to be passed through.

Offline xfull

  • Newbie
  • *
  • Posts: 2
Re: Tinycp-Roundcube Server error for attachments larger than 1Mb
« Reply #2 on: March 28, 2024, 06:35:42 PM »
Thank you I have added the line below into /opt/tinycp/domains/mail.server.com/nginx.conf and I can select and upload my file larger than 1Mb:
client_max_body_size 18M;
but after it finishes uploading I got this error:
connection error (failed to reach the server)