Replies: 5 comments
-
I normally just secure the site with 'valet secure' so I can modify the nginx.conf file. You can use this as an example: #941 I once overloaded Example: |
Beta Was this translation helpful? Give feedback.
-
Ahh, that's not a bad idea. I was doing something similar, where you do |
Beta Was this translation helpful? Give feedback.
-
@atymic I love your idea and am also having to switch php versions often and it's very annoying.. specially since there seems to be a bug when switching back to php74 and everytime it has to be reinstalled and it complains that it isn't already installed even though it clearly is any progress on your fork? @mattstauffer Would love to see this |
Beta Was this translation helpful? Give feedback.
-
Can we modify |
Beta Was this translation helpful? Give feedback.
-
https://dev.to/dyriavin/serving-sites-with-different-php-version-using-laravel-valet-49jl is a pretty helpful guide. I've made a slight addition to have a default php version - 8.1 - and another version available by manually editing the site's nginx config file in Install both versions of php: brew install [email protected]
brew unlink [email protected]
brew install php
brew unlink php
brew link [email protected] This means php 7.4 is now the active php (in my current - and new - terminal tabs). Other open terminal tabs will keep whatever version of php was active there. Edit Make sure the
Restart valet: All served sites will now be php 8. To set a specific site to php 7.4,
and change it to
Then restart valet: |
Beta Was this translation helpful? Give feedback.
-
I have a bunch of different client projects running different versions of PHP. I love valet, it's so much more light weight that docker but the only thing that bugs me is constantly switching php versions.
I was wondering if you would consider a PR that allows you pin a site to specific FPM version (having multiple running concurrently)?
I will take a crack on my fork :)
Beta Was this translation helpful? Give feedback.
All reactions