Skip to main content

Service Tuning

You can tune server settings from Settings → Services without editing config files by hand. Values persist in C:\laraenv\config.json under the services key.

After you change values, LaraEnv regenerates the affected config and reloads the service to apply your changes.

Nginx

SettingWhat it controls
server_names_hash_bucket_sizeHash bucket size for server names
server_names_hash_max_sizeMaximum size of the server names hash table
client_max_body_sizeMaximum upload (request body) size
client_body_timeoutTimeout for reading the request body
fastcgi_read_timeoutTimeout for responses from PHP (slow scripts)
proxy_read_timeoutTimeout for reverse-proxied responses
keepalive_timeoutHow long keep-alive connections stay open
worker_connectionsMaximum simultaneous connections per worker

Apache

SettingWhat it controls
TimeoutGeneral request timeout
KeepAliveTimeoutKeep-alive connection timeout
LimitRequestBodyMaximum request body (upload) size
ProxyTimeoutTimeout for proxied requests

PHP

SettingWhat it controls
upload_max_filesizeMaximum size of a single uploaded file
post_max_sizeMaximum size of all POST data
memory_limitMemory available to a script
max_execution_timeMaximum script run time
max_input_timeMaximum time to parse input data
php-cgi / FPM worker pool sizeNumber of PHP worker processes

Examples

Allow large uploads

To accept big file uploads, raise the limits on both the web server and PHP together:

  • Nginx: increase client_max_body_size (or Apache: LimitRequestBody).
  • PHP: increase upload_max_filesize and post_max_size.

If only one side is raised, the smaller limit still rejects the upload, so keep them aligned.

Avoid 504 on long requests

If a slow PHP script triggers a 504 Gateway Timeout, raise fastcgi_read_timeout (Nginx) so the web server waits longer for PHP to respond. You may also want to raise PHP's max_execution_time to match.

note

Changes are saved to C:\laraenv\config.json and applied via a reload, so you rarely need a full service restart.