How to customize web server settings on Hestia CP

2 October, 2023

Database and web-server settings during the control panel installation are done by default. Some websites find the parameters insufficient, resulting in errors such as 504 Gateway Timeout. Additionally, it is impossible to upload large files in the form of images, archives, or videos using the site manager. 

The solution to the problem lies in changing the relevant characteristics of the MariaDB database or the Nginx and Apache web servers. Below are the recommended parameters and main values. The user should select specific ones based on the server's power and the site's operational features. To start making changes, go to the “Server” section, indicated by a gear icon, and click “Edit” next to the desired value. 

Apache   

Timeout 300 — the maximum duration to wait for a request.

Additional PHP Settings

max_execution_time 300 — maximum execution time of the PHP script.
max_input_time 300 — longest time for the script to process input data. memory_limit 1024M — maximum amount of RAM that the script can use.
post_max_size 300M — maximum size of the POST request (affects the size of uploaded files).
upload_max_filesize 300M — maximum size of the uploaded file.

Nginx   

send_timeout 300s
proxy_connect_timeout 300s
proxy_send_timeout 300s
proxy_read_timeout 300s

MariaDB   

wait_timeout 300
interactive_timeout 300
max_allowed_packet 100M

Only basic characteristics are listed here. More precise configuration parameters require using an SSH connection to the server and making edits to the service configuration files.