1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-05 08:30:07 +01:00
Commit Graph

103 Commits

Author SHA1 Message Date
crynobone
c4c650d567 Fix code styling 2025-02-12 01:38:26 +00:00
Oleg339
b2cddba7e5 add server name to valet.conf (#1458)
* add server name to valet.conf

* Cosmetic change

* Cosmetic change

* change server_name `valet` to `"!valet!" ""`

---------

Co-authored-by: Bahar Oleg <oleg.b@section228.com>
2024-05-10 11:08:18 +02:00
Matt Stauffer
47847d51e9 Merge pull request #1451 from OpJePl44tsm4n/master
handle deprecated http2_push_preload conf for nginx >= 1.25.1
2023-12-20 22:28:48 -05:00
Chris Brown
6b07e425be Bandage for 502 errors using Gettext/PostgreSQL/MongoDB
Many have reported that these changes "do" help the problem.
And yet many others have reported that they make no difference.

Closes #1433

This PR is merely a bandage for a broader problem that exists in the PHP build for MacOS. See the issue referenced above for discussion and links to Homebrew and PHP repository discussions. The problem is not in Homebrew, but in the PHP build published by the PHP core.
Chime in on the PHP discussion if you want to stir up more active participation for a proper fix, telling them that you're a Mac user encountering the fork segfaults (they won't care whether you're using Valet, but they will recognize if you mention Homebrew).
2023-10-09 13:58:03 -04:00
PimPlaatsman
c66dfee102 add legacy files 2023-10-09 14:03:38 +02:00
Pim
984d7f33b1 fix http2 2023-10-06 16:05:25 +02:00
Pim
80d8890995 added http2 directive 2023-10-06 15:36:51 +02:00
Pim
6441882a14 fix secure.valet.conf format for nginx >= 1.25.1 2023-10-06 15:27:25 +02:00
StyleCI Bot
21587b7f07 Apply fixes from StyleCI 2023-02-08 03:00:12 +00:00
Matt Stauffer
15cf3fefaf Handle old, customized sample valet drivers more gracefully 2023-02-07 21:59:58 -05:00
Matt Stauffer
4c2c4a1238 Drop unnecessary doc blocks (#1339)
* Drop unnecessary doc blocks

* Apply fixes from StyleCI

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-01-11 09:14:39 -05:00
Matt Stauffer
976339f898 Support isolated sites running PHP 7.4 2022-12-26 09:47:58 -05:00
Matt Stauffer
20f48f6eab Replace some \n with PHP_EOL; move custom drivers into Custom namespace 2022-12-21 19:54:13 -05:00
Matt Stauffer
9b09621e5c Move upgrade calls into Upgrader class, and add upgrade to check for old custom drivers 2022-12-21 18:36:58 -05:00
Matt Stauffer
efa7937038 Update drivers location and loading
- Extract much of server.php into a `Server` class
- Move all but the Laravel and Basic drivers into a subfolder
- Load all but the Laravel and Basic drivers via glob
- Add `beforeLoading` hook to simplify the `frontControllerPath` method for some drivers
2022-12-18 15:08:17 -06:00
Matt Stauffer
9216b9a87b Merge pull request #1079 from mattkingshott/patch-1
Prevent 502 errors when using AJAX
2022-12-01 20:37:48 -05:00
Matt Stauffer
383aa62137 Change magic isolation config string to "ISOLATED_PHP_VERSION"
Co-Authored-By: Jacob Baker-Kretzmar <18192441+bakerkretzmar@users.noreply.github.com>
2022-03-14 14:40:45 -04:00
Matt Stauffer
3cdb7c78f4 Drop space before colon in magic isolation string 2022-03-14 12:42:11 -04:00
NasirNobin
37b4af4113 Multiple/Parallel PHP Version Support for Valet 2022-02-06 13:56:35 +06:00
Matt Kingshott
aed9da3bda Add parameters to adjust buffer size 2021-07-29 18:52:46 +01:00
Matt Kingshott
7f9ea3dec7 Move parameters to fastcgi_params 2021-07-29 18:51:30 +01:00
Matt Kingshott
b097f87180 Prevent 502 errors when using AJAX
When using the Laravel DebugBar with the `capture_ajax` flag set to `true`, its AJAX request monitoring exceeds the FastCGI buffer limit. This results in Nginx throwing a 502 Bad Gateway exception. 

This PR increases the size of the buffer. While it is not guaranteed to fix the problem, the increased buffer size should solve the issue for most developers. Further discussion on this subject can be [found in this issue on the DebugBar repo](https://github.com/barryvdh/laravel-debugbar/issues/251)
2021-07-29 16:47:24 +01:00
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