Skip to main content

Set Up PHP Debugging to WSL

Install PHP and Apache

See: https://www.digitalocean.com/community/tutorials/how-to-install-lamp-stack-on-ubuntu#step-4-creating-a-virtual-host-for-your-website

Configure multi-site configuration

See: https://www.liquidweb.com/blog/configure-apache-virtual-hosts-ubuntu-18-04/

How to connect the debugger

Create index.php for the site in /var/www/test.site.com/public_html.

See: https://www.cloudways.com/blog/php-debug/

Important paths

  • /var/www/<domain>/public_html/
  • /var/log/apache2/
    • error.log
    • access.log
  • /etc/apache2
    • apache2.conf
    • ports.conf
    • sites-available
      • <domain>.conf

Important commands

  • Restart Apache: sudo service apache2 restart
  • Enable site: sudo a2ensite <domain>