These larger buffer sizes accommodate larger requests that are often complained about in Valet support issues.
These updates are inspired by common configs in Homestead.
I've been using these in my local Valet config for 4+ months, without any negative side-effects.
Edit: commented-out several, and made consistent with Forge defaults
Fixes#772
I've been using this config change since Aug 17, 2019, without any negative side-effects.
All Valet services continue to work properly, and Valet Share still works just as expected.
If someone were to have a challenge with it, there's an easy downgrade: just remove the `127.0.0.1:` from these files, and run `valet tld test` to rebuild the individual site configs. Or just manually edit the `~/.config/valet/Nginx` site file manually.
Since the current TCP port 88 clashes with Kerberos, changing it to port 60 which IANA shows as unassigned, and other databases show as not being used in general practice.
Several alternates were researched, but show (although limited use, nevertheless possible) clashes with other systems, including ports 47, 81-90, 8080-8090, and 100. Various sources were referenced, and the overall conclusion is that 60 seems to be the safest and least likely to conflict.
Tested against a few limited firewall configs without issue.
Tested with both fresh new valet installs and an older install upgraded from 2.0.x.
Defaulting to having `ssi on;` in the `http` block will allow those of us doing Nginx Server Side Includes to use Valet in local development.
A longer explanation of SSI, why we want it, and the impact is here: https://github.com/laravel/valet/issues/513
Signed-off-by: Andrew Welch <andrew@nystudio107.com>
client_max_body_size does not propagate down from the http context into
the server context.
See this stack overflow for further details on the issue:
https://stackoverflow.com/questions/2056124/nginx-client-max-body-size-has-no-effect
This fix ensures that the max client body size is always the default
128mb as specified in nginx.conf.
- Sets `client_max_body_size 128M` in `http` section of `nginx.conf` so it covers all configs
- Adds `php-memory-limits.conf` to `php-fpm` conf folder, to set `memory_limit`, `upload_max_filesize`, `post_max_size` all to 128M
(Updates #253 by moving config location to cover all, since #253 didn't cover secure configs, etc)
When retrieving the query string in your app, it's twice the value it should be.
For example I have a request like "/overview?page=1" when I use request()->server('QUERY_STRING') I get "page=1&page=1" instead of "page=1".
Removing the ?$querystring for the Nginx config in the rewrite directive fixes this.
* Correct the return type annotation in a serves method
* Type-hint the driver in the abstract ValetDriver
* Correct the return type-hint in the sample ValetDriver
* Remove the return afrom the restartLinkedPhp method
* Remove the return annotation from the Caddy constructor
* Remove the return annotation from the Valet configuration constructor
* Removed the return from the prependPath method of the Configuration class
* Removed the return from the appendAsUser method of the Filesystem class
* Removed the return annotation from the Site constructor
* Corrected the parameter annotation of the link method in the Site class
* Order use statements by length in PhpFpm
* Remove the return annotation from the Valet constructor