add server name to valet.conf#1458
Conversation
|
Can you point to documentation showing how PHPStorm does this, and how it wants to be configured? |
|
I'm concerned that simply using As outlined in the nginx docs, the server_name is used for determining which Given that Valet aims to serve anything directed at it (unlike a real live webserver which aims to serve only for the domain names that server is actually servicing), perhaps specifying some of its supported fallbacks may be suitable without breaking the "serve anything" objective:
Thus probably something like: So, I propose: But I'd like to see the difference in PHPStorm's reaction to such a config. Hence requesting more information on their expectations. |
|
Also: it's only the non-secured "sites" that have had no server_name directive. All valet's "secured" sites name the specific domain that's been secured (to match the SSL cert), so are not nameless. |
This requirement is not stated in the phpstorm documentation, but I think it will be enough to show a screenshot and a thread on the jetbrains forum. i think
|
|
What version of PHPStorm are you using? Their ticket system indicates that a fix was implemented awhile back. |
|
I was following the thread until this:
Is there something we need to consider that I missed here? Otherwise I'm hoping it's good to merge? |
|
I don't have xdebug set up to explore this with. |
|
Hello 👋 I've just been trying to set up Xdebug in PhpStorm via Valet and I have just stumbled onto this issue. tl;dr This PR fixes solves the issue and doesn't seem to introduce any problems. I wanted to chime in and give some info since this PR seems pretty dormant. (Much of this is probably info you already knew). Bear with me! When PhpStorm is listening for Xdebug connections, since Valet doesn't send a This an issue if you want to customize anything about the server configuration as PhpStorm won't let you save without a host. (e.g. If you're dealing with symlinks, this is something you'll have to do) By adding the (This blank behavior doesn't happen if you've Browsing other Valet sites, this addition to the config file doesn't seem to have any negative effects. The only downside I can see is if you were doing some variation of Some drivers seem to set this manually (for example, the basic driver). Using I'm not sure what the reason was for adding that line to BasicDriver etc but it wouldn't help the xdebug situation since PhpStorm would have already picked up the request before Valet sets it. Hope this is useful! 😅 |
|
Thanks @jasonvarga , great to have an additional set of eyes on this confirming its viability. I'm satisfied that this PR is both useful and harmless. /cc @mattstauffer |
|
Thanks all |





Added server name to nginx for more comfortable debugging in PHPStorm. PHPStorm requires not empty server_name