WSL2で立ち上げたserverにwindowsからlocalhostでアクセスできない時
これをやる
1. %USERPROFILE%/.wslconfigに以下を記入する
wslconfig
code:.wslconfig(toml)
wsl2
localhostForwarding=true
2. wsl --shutdownを実行するhttps://qiita.com/v2okimochi/items/f53edcf79a4b71f519b1#wsl2を再起動する
再起動コマンド(wsl -t Ubuntu)は代替不可
高速スタートアップをOFFにすることでも解決できるらしいhttps://patorash.hatenablog.com/entry/2021/01/15/023617 ?
References
Wslconfigを使用したWSL2の設定
#WSL2 #localhost
#2024-07-21 10:02:19
#2021-11-01 07:56:50