phpmon icon indicating copy to clipboard operation
phpmon copied to clipboard

Allow customization of nginx files that remains persistent via e.g. hooks

Open arukompas opened this issue 3 years ago • 2 comments

Enhancement requests that are not immediately approved will be moved to a discussion instead.

Thanks for the PHP Monitor! Love the interface and its ease of use! I think it could be improved even further with this little (might be hard) feature :)

Is your feature request related to a problem? Please describe. The problem is not knowing/being very difficult to change the default request timeout for Valet websites. There's multiple files in various places that have to be edited, and it's unsure when those files will be reset by Valet to their default settings. So, at the moment, it's very difficult and time consuming to update the default request timeout to something bigger than the default 60 seconds.

Describe the solution you'd like Perhaps an option in the Preferences?

Describe alternatives you've considered

  • https://github.com/laravel/valet/issues/315
  • https://stackoverflow.com/questions/67641006/laravel-valet-504-gateway-time-out-nginx-1-19-6-after-60-seconds

Tried both of these places, but have yet to come to a solution that works easily :) Something always gets reset by valet when switching versions or upgrading global Composer packages.

Additional context none

arukompas avatar Apr 01 '22 14:04 arukompas

Ah yes, this is a familiar issue, I have this problem with a specific domain that needs some custom configuration and it always gets reset! As far as I understand, Valet will replace any custom nginx configuration when you either:

  • Cause a configuration change that removes and replaces the nginx file
  • Run valet install

As far as your request is concerned: this is something that could be added to PHP Monitor, but I think this might also be a nice addition to Valet. Perhaps as an extra config value in config.json?

In terms of issue complexity: PHP Monitor doesn't actually modify the nginx files, so this would indeed be tricky. I've also been looking into hooks which could also be nice -- run certain commands (e.g. populate nginx domains with a specific value) whenever something happens (e.g. at launch, when switching versions).

nicoverbruggen avatar Apr 01 '22 16:04 nicoverbruggen

I tweeted about this a while back, and for personal reference I'm posting the tweet here. Once work on PHP Monitor 6.0 starts, this will be relevant.

https://twitter.com/nicoverbruggen/status/1523685930435244032

image

nicoverbruggen avatar Aug 17 '22 18:08 nicoverbruggen

There's a good chance this will be improved in Laravel Valet itself (now that it will support .valetrc files in Valet 4 and newer) so I'm shelving this until I know more about what's coming up.

May revisit this at some point, but closing the issue for now.

nicoverbruggen avatar Feb 16 '23 16:02 nicoverbruggen