1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-06 08:40:09 +01:00
Commit Graph

81 Commits

Author SHA1 Message Date
Mikaël Popowicz
00707ce04c Reverting secure.valet.conf. 2021-04-30 21:08:29 +02:00
Mikaël Popowicz
01f4b582e6 ♻️ Refactoring proxy command. Proxy is not secured by default. 2021-04-30 14:31:55 +02:00
Mikaël Popowicz
7fdcdd3544 🚚 Use insecure instead of unsecure. 2021-04-26 18:00:33 +02:00
Mikaël Popowicz
b64b9bd81a Removing Ngrok stuff from proxy stubs. 2021-04-26 09:37:18 +02:00
Mikaël Popowicz
bfe95c26dd ♻️ Refactoring secure proxy stub. Fixing SiteTest. 2021-04-23 22:18:14 +02:00
Mikaël Popowicz
3098f5ff0a Merge branch 'master' into feature/unsecure-proxy
# Conflicts:
#	cli/Valet/Site.php
#	cli/stubs/proxy.valet.conf
2021-04-23 22:01:16 +02:00
Mikaël Popowicz
a876175c6a ♻️ Refactoring resecureForNew* methods to resecureForNewConfiguration. 2021-02-23 22:32:50 +01:00
Mikaël Popowicz
7bb5326a27 🐛 Fixing default Nginx stub. 2021-02-22 18:49:36 +01:00
Mikaël Popowicz
0c0ab726c0 🐛 Fixing Nginx configuration.
 Adding alias generation and launch daemon generation.
2021-02-22 18:43:39 +01:00
Mikaël Popowicz
2d5ee9d7cc Add loopback command. 2021-02-21 23:21:12 +01:00
Mikaël Popowicz
34b1cece72 Merging master. 2020-11-30 09:45:11 +01:00
Chris Brown
0b341a7ca1 Update test suite to phpunit 9.5
Update test suite to phpunit 9.5 syntax
Refactored to use polyfill for older PHP versions via `yoast/phpunit-polyfills`

Note: this includes 2 important differences from usual phpunit test suites:
- instead of extending `PHPUnit\Framework\TestCase` we extend `Yoast\PHPUnitPolyfills\TestCases\TestCase`
- instead of handling fixtures via `setUp()` and `tearDown()` we use `set_up()` and `tear_down()` respectively

Comment regarding formatting: I chose to use the FQDN in the `extends` syntax of the class declaration instead of using `use` so that it is more quickly apparent that we're doing something slightly different than usual phpunit syntax, particularly in regards to the set_up() / tear_down() methods that appear immediately following the `extends` line.
2020-11-29 12:10:05 -05:00
Mikaël Popowicz
a419fb11fe Removing Ngrok stuff from proxy stubs. 2020-11-29 09:14:04 +01:00
Mikaël Popowicz
ea777a9e94 Adding ability to create unsecure proxy. 2020-11-28 23:22:07 +01:00
Chris Brown
ce0999f8cd Point PHP-FPM error_log to user directory
Old: `/usr/local/var/log/php-fpm.log`
New: `~/.config/valet/Log/php-fpm.log`

(We already put `~/.config/valet/Log/nginx-error.log` there)

This avoids ARM Mac differences in directory paths.
2020-11-23 09:21:55 -05:00
Beau Simensen
1959e95c50 Stops interfering with favicon and robots for proxies 2020-05-06 15:56:59 -05:00
Matt Stauffer
73b16c08b0 Merge pull request #913 from drbyte/valet-proxy
Add proxy site-handling commands
2020-04-30 11:44:44 -04:00
Chris Brown
f056663159 Add proxy site-handling commands
valet proxy domain host
valet unproxy domain
valet proxies (to list all recognized proxy site configs)
2020-04-27 23:01:59 -04:00
Chris Brown
ff9edb9cf8 Increase default client_max_body_size and post_max_size to 512M 2020-03-03 14:31:55 -05:00
Chris Brown
30e28614f4 Increase default PHP memory_limit to 512M
PHP's default is 128M, but it's becoming common practice to set the value to 512M in dev and production
Plus, currently homestead sets it to 512M as well.
2020-03-02 11:28:54 -05:00
Chris Brown
637d26a08f Update nginx.conf
Just re-ordering directives to keep gzip stuff together.

No impact to existing installs.

Updates #517
2020-01-15 12:09:36 -05:00
Chris Brown
d39ac0c1a8 Comments must only use semicolons, not hash symbols
PHP configs no longer support `#` for comments. Must use semicolons `;`.

Otherwise PHP may not start, and may show a confusing error in logs: `value is NULL for a ZEND_INI_PARSER_ENTRY`
2020-01-04 13:09:17 -05:00
Chris Brown
b5c8257b86 Comment out memory limits so other configs take precedence 2019-12-23 17:34:54 -05:00
Matt Stauffer
d301e4ac11 Merge pull request #856 from drbyte/dnsmasq-customconfig
Use custom dnsmasq.d folder for easier config and support
2019-12-05 15:15:18 -05:00
Matt Stauffer
fea8208eb0 Merge pull request #858 from drbyte/phpfpm-simplify
Move PHP-FPM pool config to separate valet-specific file
2019-12-05 15:14:23 -05:00
Chris Brown
139a916013 Move PHP-FPM config to separate valet-specific file
This allows the valet configuration to stand separately from the default PHP config.
This benefits troubleshooting, makes customization of FPM workers and other settings easer
and allows for easier uninstallation.

Also renames any previously-existing `www.conf` pool config so it doesn't conflict with Valet nor run unnecessary additional processes.
2019-12-05 15:01:11 -05:00
Chris Brown
02ad7f44ff Dnsmasq allows use of a common config folder, much like nginx and php do.
This PR changes Valet's default config process to empower this feature, which makes installation less intrusive, and easier to identify and remove valet-specific customizations.

This will make for easier troubleshooting
... and easier customizing (such as dropping in a custom logging config, additional TLDs, alternate DNS resolvers, etc)

Also removes old dnsmasq configs used by prior Valet versions
2019-12-02 15:02:56 -05:00
Chris Brown
36de050d32 Set robots nofollow for all valet share traffic
Replaces and closes #575 ... for reasons described there.
2019-11-30 16:55:48 -05:00
Bálint Szekeres
9d7214842b fastcgi_split_path_info with location regex fix 2019-10-17 16:12:21 +02:00
Matt Stauffer
7deb886b58 Revert "Increase nginx buffer sizes in dev"
This reverts commit 536e59990b.
2019-09-10 20:32:30 -04:00
Matt Stauffer
6170995abb Merge pull request #819 from drbyte/forge-matchup2-logs
Turn off logging of hits to robots.txt and favicon.ico
2019-09-10 16:20:56 -04:00
Matt Stauffer
e419cbdf5b Merge pull request #818 from drbyte/forge-matchup1
Allow for longer domain names
2019-09-10 16:19:56 -04:00
Matt Stauffer
1ebb212413 Merge pull request #813 from drbyte/larger-buffers
Increase nginx buffer sizes in dev
2019-09-10 16:19:08 -04:00
Chris Brown
536e59990b Increase nginx buffer sizes in dev
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
2019-09-09 17:42:00 -04:00
Chris Brown
d269621e98 Turn off logging of hits to robots.txt and favicon.ico
A long-requested adjustment to Valet is to bypass the logging of robots.txt and favicon.ico hits. Particularly when keeping an Ngrok session alive.

This update is consistent with default logging settings in Forge.
2019-09-09 17:29:48 -04:00
Chris Brown
68e1ee6491 Add corresponding setting, also from Forge.
Ref: http://nginx.org/en/docs/hash.html
2019-09-09 17:24:17 -04:00
Chris Brown
0563408bc7 Allow for longer domain names
Increases domain name length support in Valet per #543 and #808
This is the same setting used in Forge
2019-09-09 17:18:37 -04:00
Matt Stauffer
9422e70798 Merge pull request #573 from corneliusio/master
Allow http2 server push for secured domains [BREAKING]
2019-09-09 13:54:38 -04:00
Chris Brown
fcd73d73bc Improve security by listening on 127.0.0.1 only
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.
2019-09-07 17:44:19 -04:00
Sahib J. Leo
001058414b #691 Surround with quotes all paths which might contain blank spaces. 2018-12-27 11:24:41 -05:00
Chris Brown
b803a37855 Change valet share to use port 60
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.
2018-11-12 16:00:05 -05:00
Matt Stauffer
10c5239ddc Merge pull request #630 from sdbruder/fix-ngrok-issue
fix for share of secured sites
2018-09-19 22:24:35 -04:00
Sergio Bruder
ac7b371d49 fix for share of secured sites 2018-09-14 03:39:33 -03:00
Cornelius Ukena
fe5828edd9 allow http2 server push for secured domains 2018-04-23 15:00:57 -05:00
Andrew Welch
61514e5f52 Add ssi on; to the default config
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>
2018-02-01 13:19:23 -05:00
Kim Ravn Hansen
b8bfe077b4 Ensure 128mb max client body size.
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.
2017-06-22 05:55:58 +02:00
Adam Wathan
fda0d3440d Fix issue with favicon 404s 2017-06-21 09:12:46 -04:00
Adam Wathan
fd8ef9980c Merge pull request #272 from stayallive/patch-1
Fix for query string in secure config
2017-02-20 09:28:29 -05:00
Adam Wathan
a249072310 Merge pull request #277 from drbyte/fix-413-request-entity-too-large-and-uploads
Fix large-upload problems by setting PHP limits and Nginx max size
2017-02-20 09:25:12 -05:00
Josh Manders
f51959f7ec add wildcard san certs 2017-02-17 18:10:41 -06:00