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
| Setting | What it controls |
|---|---|
server_names_hash_bucket_size | Hash bucket size for server names |
server_names_hash_max_size | Maximum size of the server names hash table |
client_max_body_size | Maximum upload (request body) size |
client_body_timeout | Timeout for reading the request body |
fastcgi_read_timeout | Timeout for responses from PHP (slow scripts) |
proxy_read_timeout | Timeout for reverse-proxied responses |
keepalive_timeout | How long keep-alive connections stay open |
worker_connections | Maximum simultaneous connections per worker |
Apache
| Setting | What it controls |
|---|---|
Timeout | General request timeout |
KeepAliveTimeout | Keep-alive connection timeout |
LimitRequestBody | Maximum request body (upload) size |
ProxyTimeout | Timeout for proxied requests |
PHP
| Setting | What it controls |
|---|---|
upload_max_filesize | Maximum size of a single uploaded file |
post_max_size | Maximum size of all POST data |
memory_limit | Memory available to a script |
max_execution_time | Maximum script run time |
max_input_time | Maximum time to parse input data |
| php-cgi / FPM worker pool size | Number 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_filesizeandpost_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.
Changes are saved to C:\laraenv\config.json and applied via a reload, so you rarely need a full service restart.
Related
- Troubleshooting — diagnose timeouts and upload errors
- PHP extensions — manage extensions per PHP version