Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
deb12:lamp [2024/05/23 06:22] – [WSL2 (mirrored)] Bernard Condraudeb12:lamp [2025/11/17 14:53] (current) – [Create certificate for localhost] Bernard Condrau
Line 142: Line 142:
   * [[https://xdebug.org/docs/install|Xdebug: Installation]]   * [[https://xdebug.org/docs/install|Xdebug: Installation]]
   * [[https://xdebug.org/docs/all_settings|Xdebug: all settings]]   * [[https://xdebug.org/docs/all_settings|Xdebug: all settings]]
 +  * [[https://xdebug.org/docs/upgrade_guide|Upgrading from Xdebug 2 to 3]]
  
 ===== MariaDB 10.11.6 Installation ===== ===== MariaDB 10.11.6 Installation =====
Line 182: Line 183:
 echo -e "[Xdebug]" > $INI echo -e "[Xdebug]" > $INI
 echo -e "xdebug.client_host=$IP" >> $INI</code> echo -e "xdebug.client_host=$IP" >> $INI</code>
 +  * Check the xdebug logfile with ''tail -f /path/to/log/xdebug.log'' until this is working properly
 +
 +=== Windows host IP address ===
   * Alternatively you could use the Windows host IP address (feasible if it remains the same through re-boots) in which case you need to add a firewall rule to allow access through the xdebug port. Command to run in an elevated PowerShell:<code>New-NetFirewallRule -DisplayName "xdebug" -InterfaceAlias "vEthernet (WSL (Hyper-V firewall))" -Direction Inbound -Protocol TCP -LocalPort 9003 -Action Allow</code>   * Alternatively you could use the Windows host IP address (feasible if it remains the same through re-boots) in which case you need to add a firewall rule to allow access through the xdebug port. Command to run in an elevated PowerShell:<code>New-NetFirewallRule -DisplayName "xdebug" -InterfaceAlias "vEthernet (WSL (Hyper-V firewall))" -Direction Inbound -Protocol TCP -LocalPort 9003 -Action Allow</code>
   * Commands to check or remove the firewall rule:<code>Get-NetFirewallRule -DisplayName "xdebug"   * Commands to check or remove the firewall rule:<code>Get-NetFirewallRule -DisplayName "xdebug"
 Remove-NetFirewallRule -DisplayName "xdebug"</code> Remove-NetFirewallRule -DisplayName "xdebug"</code>
-  * Check the xdebug logfile with ''tail -f /path/to/log/xdebug.log'' until this is working properly 
  
 ==== WSL2 (mirrored) ==== ==== WSL2 (mirrored) ====
   * WSL2 set to ''mirrored'' networking mode   * WSL2 set to ''mirrored'' networking mode
   * This networking mode is available for Windows 11  23H2 and later   * This networking mode is available for Windows 11  23H2 and later
-  * To enabled ''mirrored'' mode, save the following content as file ''.wslconfig'' into folder ''C:\Users\<user>'' on your Windows host<code>[wsl2] +  * To enabled ''mirrored'' mode, save the following content as file ''.wslconfig'' into folder ''C:\Users\<user>'' on your Windows host<file>[wsl2] 
-networkingMode=mirrored</code>+networkingMode=mirrored</file>
   * Your Linux box runs within a Hyper-V Virtual Machine   * Your Linux box runs within a Hyper-V Virtual Machine
   * You can access the Windows host through the IP address ''127.0.0.1'', no firewall rule is necessary   * You can access the Windows host through the IP address ''127.0.0.1'', no firewall rule is necessary
Line 199: Line 202:
 ==== Links ==== ==== Links ====
   * [[https://gist.github.com/SomajitDey/68e8cd639e3bf592bded035630cf86ec|How to forward WSL2 port to Windows port and vice versa]]   * [[https://gist.github.com/SomajitDey/68e8cd639e3bf592bded035630cf86ec|How to forward WSL2 port to Windows port and vice versa]]
-  * [[https://xdebug.org/docs/upgrade_guide|Upgrading from Xdebug 2 to 3]] 
  
 ===== SSL for localhost ===== ===== SSL for localhost =====
Line 236: Line 238:
     * You can check the domain names included in the original certificate:<code>openssl x509 -text < $CERT_FILE</code>     * You can check the domain names included in the original certificate:<code>openssl x509 -text < $CERT_FILE</code>
  
 +==== Trust localhost certificate on Windows 11 ====
 +  * Run ''certmgr.msc'', then select //Trusted Root Certification Authorities//
 +  * Right-click on //Certificates// and select //All Tasks --> Import...//. Import the ''RootCA.crt'' file and accept all questions with default answer.
 ==== Links ==== ==== Links ====
   * [[https://www.sslshopper.com/ssl-checker.html|SSL Checker]]   * [[https://www.sslshopper.com/ssl-checker.html|SSL Checker]]