Get Social

Error: mod_fcgid: HTTP request length 137536 (so far) exceeds MaxRequestLen (131072)

mod_fcgid: HTTP request length 137536 (so far) exceeds MaxRequestLen (131072)

After installing the panel ISPmanager Lite 5.126.2 with a trial license for 2 weeks (this is convenient, since during this time you can safely buy and activate the license), I ran into this error. In this case, php is configured in FastCGI mode .

When I try to start a web application, I get (in logs or in debug):

mod_fcgid: HTTP request length 132992 (so far) exceeds MaxRequestLen (131072), referer: http...

In the browser you can get a little informative message:

Error 500, Internal server error

Let’s return to the logs:

The 1st figure is always different and depends on the request from your application

The 2nd figure is 131072 – this is the default MaxRequestLen .

HTTP request request length 132992 (so far) exceeds MaxRequestLen (131072) indicates that your request has exceeded the default value

Hence decision will – increase this parameter.

Of course, you can insert it almost anywhere in the apache config file. It is possible in the settings of your host.

But best edit the configuration of the FastCGI module itself:

/etc/apache2/mods-available/fcgid.conf (if you have Debian, Ubuntu and their other derivatives)
/etc/httpd/conf.d/fcgid.conf (if you have CentOS, Fedora and the like)

To select the appropriate value for the MaxRequestLen parameter, look at your php.ini

upload_max_filesize = 2M

For this value, it is suitable: 2M = 2097152 bytes. Add it to your fcgid.conf file:

FcgidMaxRequestLen 2097152

After that restart apache:

apachectl restart


Templates for Yii2 on Vesta CP for backend and frontend versions.

So, I had problems with manual editing of configs in the Vesta CP (which it constantly rewrites, when something changes or is updated), I set out to make a more or less automated solution.

It did not work very nicely, because it is necessary that the backend and the frontend look in the same folder as the subfolders. This can not be achieved only by editing templates. This can be understood by looking at their syntax, which is handled by scripts, like v-add-web-domain.

There is code on github.

The templates and the script work, based on the fact that: the frontend is here -> /home/$USER/web/$DOMAIN/public_html/frontend/web backend is here -> /home/$USER/web/$DOMAIN/public_html/backend/web


Add the “apache2” and “nginx” directories from the githab repository (mentioned above) to /usr/local/vesta/data/templates/web/ (in CentOS / RHEL, you may need to rename “apache2” to “httpd”). Add script in any, you need a place on the server.

In the Vesta control panel, you can create both domains:

After that, in Vesta CP you can edit the domain settings and set the templates:
Yii2-frontend for and yii2-backend for

In the end, you can run the script with the command:
( cd your-some-directory/ )
bash ./ vestacpuser

How to change the address of the Vesta CP web interface to a subdomain

It is not always convenient for mail to be located at /webmail. But this configuration is in Vesta CP by default. While the developers of the panel have not done the same thing that we are going to do, this will have to be repeated with each new server installation.

So, let’s start:

1. Create a web domain in Vesta CP: (it can be immediately configured on https using the new, built-in ability to generate ssl certificates – letsencrypt).

2. Delete the links to the roundcube and / or in /etc/apache2 (in the sub-folders conf.d, sites-available, sites-enabled) and /etc/nginx (in the subfolder conf.d).

3. Edit Nginx configuration file (for simplicity, we use /home/admin – the standard user folder in vesta):


root /home/admin/web/your-domain/public_html;
root /var/lib/roundcube;

4. Edit Apache configuration file:


DocumentRoot /home/admin/web/
DocumentRoot /var/lib/roundcube/

and add:

# Access to tinymce files
<Directory "/usr/share/tinymce/www/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order allow,deny
    allow from all

<Directory /var/lib/roundcube/>
    Options +FollowSymLinks
    # This is needed to parse /var/lib/roundcube/.htaccess. See its
    # content before setting AllowOverride to None.
    AllowOverride All
    order allow,deny
    allow from all

# Protecting basic directories:
<Directory /var/lib/roundcube/config>
    Options -FollowSymLinks
    AllowOverride None

<Directory /var/lib/roundcube/temp>
    Options -FollowSymLinks
    AllowOverride None
    Order allow,deny
    Deny from all

<Directory /var/lib/roundcube/logs>
    Options -FollowSymLinks
    AllowOverride None
    Order allow,deny
    Deny from all

5. Let’s check the syntax:
apachectl configtest
nginx -t

6. Restart:
apachectl graceful
service nginx restart

7. And, finally, in the panel settings (https://your-ip-or-address:8083/edit/server/) SERVER -> CONFIGURE In the tab MAIL -> Webmail URL change to new (