{"id":9680,"date":"2022-11-24T22:31:58","date_gmt":"2022-11-24T22:31:58","guid":{"rendered":"https:\/\/stevepedwards.today\/DebianAdmin\/?p=9680"},"modified":"2025-06-09T04:20:32","modified_gmt":"2025-06-09T03:20:32","slug":"running-apache2-and-mysql-on-win11-wsl-ubuntu","status":"publish","type":"post","link":"https:\/\/stevepedwards.today\/DebianAdmin\/running-apache2-and-mysql-on-win11-wsl-ubuntu\/","title":{"rendered":"Running Apache2, MYSQL and WordPress on Win11 WSL Ubuntu"},"content":{"rendered":"<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_9680\" class=\"pvc_stats all  \" data-element-id=\"9680\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p>As I've done so much work on my websites and WordPress recently rebuilding\/fixing\/designing them for uploading to the web (here! lol) and I have about 256GB of space on my Win11 laptop, I wondered if all my Posts would work flawlessly on WSL, following my How-Tos line by line, and see if they worked as on Linux Mint or if there were issues. It would also be very useful to have a 2nd working backup of my home site should my very old Linux laptop fail. I thought I'd document it and log all that happens, from first steps following this Post first:<\/p>\n<p><span style=\"color: #00ff00;\">https:\/\/stevepedwards.today\/DebianAdmin\/new-mint-install-want-wordpress-at-home-full-steps-i-take\/<\/span><\/p>\n<p>I thought I'd make this version clearer for beginners to understand better what is going on so there's more explained each step than before, and as it's WSL and Win11, I don't know what may happen myself.<\/p>\n<p>Before that though - for those who know Windows but not Linux much and want to learn - how do you install WSL first? In my case it's installed already but follow the instructions.<\/p>\n<p><strong>WSL Setup<\/strong><\/p>\n<p>Open a Powershell prompt as Administrator and run:<\/p>\n<p><span style=\"color: #0000ff;\">wsl --install <\/span><\/p>\n<p><span style=\"color: #ff0000;\">Windows Subsystem for Linux is already installed.<\/span><br \/>\n<span style=\"color: #ff0000;\">The following is a list of valid distributions that can be installed.<\/span><br \/>\n<strong><span style=\"color: #ff0000;\">Install using 'wsl --install -d &lt;Distro&gt;'.<\/span><\/strong><\/p>\n<p><span style=\"color: #ff0000;\">NAME FRIENDLY NAME<\/span><br \/>\n<span style=\"color: #ff0000;\">Ubuntu Ubuntu<\/span><br \/>\n<span style=\"color: #ff0000;\">Debian Debian GNU\/Linux<\/span><br \/>\n<span style=\"color: #ff0000;\">kali-linux Kali Linux Rolling<\/span><br \/>\n<span style=\"color: #ff0000;\">SLES-12 SUSE Linux Enterprise Server v12<\/span><br \/>\n<span style=\"color: #ff0000;\">SLES-15 SUSE Linux Enterprise Server v15<\/span><br \/>\n<span style=\"color: #ff0000;\">Ubuntu-18.04 Ubuntu 18.04 LTS<\/span><br \/>\n<span style=\"color: #ff0000;\">Ubuntu-20.04 Ubuntu 20.04 LTS<\/span><br \/>\n<span style=\"color: #ff0000;\">OracleLinux_8_5 Oracle Linux 8.5<\/span><br \/>\n<span style=\"color: #ff0000;\">OracleLinux_7_9 Oracle Linux 7.9<\/span><\/p>\n<p>PS C:WINDOWSsystem32&gt;<span style=\"color: #0000ff;\"> wsl --list --verbose<\/span><br \/>\n<span style=\"color: #ff0000;\">NAME STATE VERSION<\/span><br \/>\n<span style=\"color: #ff0000;\">* Ubuntu Running 2<\/span><\/p>\n<h4>To access the files in the wsl2 UBUNTU distro from the WINDOWS 11 explorer:<\/h4>\n<p>Open windows explorer and enter wsl$ in the address bar - it's the same place as the Linux icon under the Network link:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/WSL.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-9737\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/WSL.png\" alt=\"\" width=\"923\" height=\"389\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #ff0000;\">NEVER<\/span> change files with Win tools in here as you can corrupt the Linux OS!! It's just for reference and orientation!!<\/strong><\/p>\n<p>IF you want GUI access to your Linux systems, see this link for Win10 - it doesn't work for my Win11 - it won't get past the Ubuntu login page then Win RDT drops out:<\/p>\n<p><a href=\"https:\/\/dev.to\/aitorsol\/wsl2-windows-linux-subsystem-a-guide-to-install-a-local-web-server-ubuntu-20-04-apache-php8-y-mysql8-3bbk\">https:\/\/dev.to\/aitorsol\/wsl2-windows-linux-subsystem-a-guide-to-install-a-local-web-server-ubuntu-20-04-apache-php8-y-mysql8-3bbk<\/a><\/p>\n<p>Once your Linux Distribution choice is installed, search for WSL in Windows, create a penguin shortcut to put on your Taskbar, open a terminal and feel free to update all the packages from the repositories of whatever Distro you chose, using it's command - Ubuntu in my case. Get to your home directory first for reference:<\/p>\n<p><span style=\"color: #0000ff;\">cd<\/span><\/p>\n<p>stevee@laptop:~$ <span style=\"color: #0000ff;\">ls -al<\/span><br \/>\n<span style=\"color: #ff0000;\">total 52<\/span><br \/>\n<span style=\"color: #ff0000;\">drwxr-xr-x 5 stevee stevee 4096 Nov 21 23:57 .<\/span><br \/>\n<span style=\"color: #ff0000;\">drwxr-xr-x 3 root root 4096 Sep 22 14:32 ..<\/span><br \/>\n<span style=\"color: #ff0000;\">-rw------- 1 stevee stevee 8252 Nov 24 19:12 .bash_history<\/span><br \/>\n<span style=\"color: #ff0000;\">-rw-r--r-- 1 stevee stevee 220 Sep 22 14:32 .bash_logout<\/span><br \/>\n<span style=\"color: #ff0000;\">-rw-r--r-- 1 stevee stevee 3771 Sep 22 14:32 .bashrc<\/span><br \/>\n<span style=\"color: #ff0000;\">-rw-r--r-- 1 stevee stevee 62 Oct 17 11:11 .gitconfig<\/span><br \/>\n<span style=\"color: #ff0000;\">drwxr-xr-x 2 stevee stevee 4096 Sep 22 14:32 .landscape<\/span><br \/>\n<span style=\"color: #ff0000;\">drwxr-xr-x 3 stevee stevee 4096 Oct 16 20:19 .local<\/span><br \/>\n<span style=\"color: #ff0000;\">-rw-r--r-- 1 stevee stevee 0 Nov 24 15:43 .motd_shown<\/span><br \/>\n<span style=\"color: #ff0000;\">-rw-r--r-- 1 stevee stevee 807 Sep 22 14:32 .profile<\/span><br \/>\n<span style=\"color: #ff0000;\">drwx------ 2 stevee stevee 4096 Nov 24 15:43 .ssh<\/span><br \/>\n<span style=\"color: #ff0000;\">-rw-r--r-- 1 stevee stevee 0 Sep 22 14:45 .sudo_as_admin_successful<\/span><br \/>\n<span style=\"color: #ff0000;\">-rw------- 1 stevee stevee 3893 Oct 17 10:57 .viminfo<\/span><\/p>\n<p><span style=\"color: #0000ff;\">\u00a0sudo apt update<\/span><\/p>\n<p><span style=\"color: #ff0000;\">30 packages can be upgraded. Run 'apt list --upgradable' to see them.<\/span><\/p>\n<p><span style=\"color: #0000ff;\">\u00a0sudo apt upgrade<\/span><\/p>\n<p><span style=\"color: #0000ff;\">sudo apt autoremove<\/span><\/p>\n<p><strong>Samba Setup<\/strong><\/p>\n<p>Now I can start with my first steps from my Post above toward a WSL based webserver for my WordPress sites:<\/p>\n<p><span style=\"color: #0000ff;\">sudo apt-get install ssh nmap vim automake autoconf module-assistant nbtscan locate libnss-winbind winbind g++ gparted intel-microcode amd64-microcode linux-firmware mysql-server wordpress apache2 samba libapache2-mod-php php-mbstring php-curl php php-mysql<\/span><\/p>\n<p>If you have a slow ADSL connection for the downloads, open another Linux terminal to continue other tasks like setting a root password:<\/p>\n<p>stevee@laptop:~$ <span style=\"color: #0000ff;\">sudo passwd root<\/span><br \/>\n<span style=\"color: #ff0000;\">New password:<\/span><br \/>\n<span style=\"color: #ff0000;\">Retype new password:<\/span><br \/>\n<span style=\"color: #ff0000;\">passwd: password updated successfully<\/span><\/p>\n<p>A samba network share password is required to access other Linux network shares later - the same password as the your user name on those other PCs to keep logins simple:<\/p>\n<p><span style=\"color: #0000ff;\">sudo smbpasswd -a stevee<\/span><\/p>\n<p><span style=\"color: #ff0000;\">New SMB password:<\/span><br \/>\n<span style=\"color: #ff0000;\">Retype new SMB password:<\/span><br \/>\n<span style=\"color: #ff0000;\">Added user stevee.<\/span><\/p>\n<p><span style=\"color: #0000ff;\">sudo vim \/etc\/samba\/smb.conf<\/span><\/p>\n<p>Uncomment the [homes] section - permissions according to what read\/write access you want to allow from remote PCs:<\/p>\n<p><span style=\"color: #ff0000;\">[homes]<\/span><\/p>\n<p><span style=\"color: #ff0000;\">; comment = Home Directories<\/span><br \/>\n<span style=\"color: #ff0000;\">browseable = 1<\/span><\/p>\n<p><span style=\"color: #ff0000;\">read only = 0<\/span><\/p>\n<p><span style=\"color: #ff0000;\">create mask = 0775<\/span><\/p>\n<p><span style=\"color: #ff0000;\">directory mask = 0775<\/span><\/p>\n<p><span style=\"color: #ff0000;\">valid users = %S<\/span><\/p>\n<p>To add extra shares, write them at the bottom of the smb.conf file in the form:<\/p>\n<p><span style=\"color: #00ff00;\">[var_www]<\/span><br \/>\n<span style=\"color: #00ff00;\">path = \/var\/www\/<\/span><br \/>\n<span style=\"color: #00ff00;\">writeable = 1<\/span><br \/>\n<span style=\"color: #00ff00;\">browseable = 1<\/span><\/p>\n<p>Save the file in vim with<\/p>\n<p><span style=\"color: #0000ff;\">:wq<\/span><\/p>\n<p>Check it for errors:<\/p>\n<p>stevee@laptop:~$ <span style=\"color: #ff0000;\">testparm<\/span><br \/>\n<span style=\"color: #ff0000;\">Load smb config files from \/etc\/samba\/smb.conf<\/span><br \/>\n<span style=\"color: #ff0000;\">Loaded services file OK.<\/span><br \/>\n<span style=\"color: #ff0000;\">Weak crypto is allowed<\/span><\/p>\n<p>Start Samba services:<\/p>\n<p><span style=\"color: #0000ff;\"> sudo service smbd start<\/span><\/p>\n<p><span style=\"color: #0000ff;\"> sudo service nmbd start<\/span><\/p>\n<p>But nothing on the network is visible - windows stopped using SMB for network connections a while ago, why Linux and Windows can oly connect via mapped drives out of the box now - but the Linux laptop should be seen?:<\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">sudo smbstatus<\/span><br \/>\n<span style=\"color: #ff0000;\">sudo: unable to resolve host laptop: System error<\/span><\/p>\n<p><span style=\"color: #ff0000;\">Samba version 4.13.17-Ubuntu<\/span><br \/>\n<span style=\"color: #ff0000;\">PID Username Group Machine Protocol Version Encryption Signing<\/span><\/p>\n<p><strong>APACHE2 Setup<\/strong><\/p>\n<p>For WP to run, not just read the wp-*php files it will require:<\/p>\n<p><span style=\"color: #0000ff;\">sudo apt install mysql-server wordpress apache2 libapache2-mod-php php-mbstring php-curl php php-mysql<\/span><\/p>\n<p>As these have already been installed above, there may be nothing to do except another:<\/p>\n<p><span style=\"color: #0000ff;\">sudo apt autoremove<\/span><\/p>\n<p>Configure the Apache2 files to suit your site - I only want 2 sites available whose WordPress content folders will be stored in \/var\/www:<\/p>\n<p><span style=\"color: #0000ff;\">sudo vi \/etc\/apache2\/sites-enabled\/000-default.conf<\/span><\/p>\n<p><span style=\"color: #ff0000;\">DocumentRoot \/var\/www<\/span><br \/>\n<span style=\"color: #ff0000;\">Alias \"DebianAdmin\" \"\/var\/www\/DebianAdmin\"<\/span><br \/>\n<span style=\"color: #ff0000;\">Alias \"ElectronicsStuff\" \"\/var\/www\/ElectronicsStuff\"<\/span><\/p>\n<p>Amend this file accordingly:<\/p>\n<p><span style=\"color: #0000ff;\">sudo vi \/etc\/apache2\/apache2.conf<\/span><\/p>\n<p><span style=\"color: #ff0000;\"># Global configuration<\/span><br \/>\n<span style=\"color: #ff0000;\">#<\/span><br \/>\n<span style=\"color: #ff0000;\">ServerName <strong>laptop<\/strong><\/span><br \/>\n<span style=\"color: #ff0000;\"># In vim, press\u00a0\/\u00a0then search \"var\/www\", and change code to:<\/span><\/p>\n<p><span style=\"color: #ff0000;\">&lt;Directory \/var\/www&gt;<\/span><br \/>\n<span style=\"color: #ff0000;\">Options Indexes FollowSymLinks<\/span><br \/>\n<span style=\"color: #ff0000;\">AllowOverride <strong>All<\/strong><\/span><br \/>\n<span style=\"color: #ff0000;\">Require all <strong>granted<\/strong><\/span><br \/>\n<span style=\"color: #ff0000;\">&lt;\/Directory&gt;<\/span><\/p>\n<p>stevee@laptop:~$ <span style=\"color: #0000ff;\">sudo service apache2 restart<\/span><br \/>\n<span style=\"color: #ff0000;\">* Restarting Apache httpd web server apache2<\/span><\/p>\n<p>If you now enter your http site name in a browser bar you should see the insecurity compliant:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/LaptopApache.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-9687 alignleft\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/LaptopApache.png\" alt=\"\" width=\"574\" height=\"309\" \/><\/a><\/p>\n<p>If you continue, you won't see any site files, as I haven't copied the WP contents folder or index.html to \/var\/www or set the permissions yet.<\/p>\n<p>So my user and Apache2 has access to the web folder \/var\/www, set the ownership of user:group:<\/p>\n<p><span style=\"color: #0000ff;\">sudo chown stevee:www-data -R \/var\/www\/<\/span><\/p>\n<p><span style=\"color: #0000ff;\"> sudo chmod 775 -R \/var\/www\/<\/span><\/p>\n<p><span style=\"color: #0000ff;\">ls -l \/var\/www\/<\/span><br \/>\n<span style=\"color: #ff0000;\">total 4<\/span><br \/>\n<span style=\"color: #ff0000;\">drwxrwxr-x 2 stevee www-data 4096 Nov 24 22:55 html<\/span><\/p>\n<p>Now I have to copy the WP site's content folders here from where they are already - I don't need to be root as I own both source and destination folders - about 7.4GB in total:<\/p>\n<p><span style=\"color: #0000ff;\">cp -vr \/mnt\/c\/MyShare\/www\/* \/var\/www\/<\/span><\/p>\n<p>The files retain their old ownership permissions so have to be changed again for Apache2 group access.<\/p>\n<p>stevee@laptop:\/var\/www$<span style=\"color: #0000ff;\"> ls -l \/var\/www\/<\/span><br \/>\n<span style=\"color: #ff0000;\">total 4653712<\/span><br \/>\n<span style=\"color: #ff0000;\">-rwxr-xr-x 1 stevee <strong>stevee<\/strong> 2480 Nov 24 23:36 android-chrome-96x96.png<\/span><br \/>\n<span style=\"color: #ff0000;\">-rwxr-xr-x 1 stevee <strong>stevee<\/strong> 3167 Nov 24 23:36 Apache2SSLCerts.txt<\/span><br \/>\n<span style=\"color: #ff0000;\">-rwxr-xr-x 1 stevee <strong>stevee<\/strong> 1898 Nov 24 23:36 apple-touch-icon.png<\/span><\/p>\n<p>Assume all wp site folders are unpacked or copied into \/var\/www\/. Set all files to correct permissions for a local PC only (755\/644) or network group access (775\/664) and user:group permissions:<\/p>\n<p><span style=\"color: #0000ff;\">sudo chown stevee:www-data -R \/var\/www<\/span><\/p>\n<p><span style=\"color: #0000ff;\">sudo find \/var\/www\/ -type d -exec chmod 775 -R {} +<\/span><\/p>\n<p><span style=\"color: #0000ff;\">sudo find \/var\/www\/ -type f -exec chmod 664 -R {} +<\/span><\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">ls -l \/var\/www\/<\/span><br \/>\n<span style=\"color: #ff0000;\"><strong>-rw-rw-r-- 1<\/strong> <strong>stevee www-data<\/strong> 4603540204 Nov 24 23:36 backup-11.23.2022_20-15-52_steveped.tar.gz<\/span><br \/>\n<span style=\"color: #ff0000;\"><strong>drwxrwxr-x<\/strong> 2 <strong>stevee www-data<\/strong> 4096 Nov 24 23:36 CTQuiz<\/span><br \/>\n<span style=\"color: #ff0000;\"><strong>drwxrwxr-x<\/strong> 6 <strong>stevee www-data<\/strong> 4096 Nov 24 23:40 DebianAdmin<\/span><\/p>\n<p>These permissions allow network access to the site.<\/p>\n<p>To be sure WP can update plugins and Themes if 775\/644 doesn't allow them to change the updates\/plugins folders in wp-content:<br \/>\n<span style=\"color: #0000ff;\">sudo find \/var\/www\/*\/wp-* -type d -exec chmod 777 -R {} ;<\/span><\/p>\n<p>If this was a production site it would have to be changed back to 755\/644 afterward if necessary. My web host sites don't have to be changed from default permissions 755\/644, but home sites do.<\/p>\n<p><strong>MYSQL Setup\u00a0<\/strong><\/p>\n<p>Before I import the different site's SQL database files, they need to have all references to the old site name - localhost - changed to the new server's name - \"localhost\" (IMPORTANTLY in this case - as I found out after doing all this Post).<\/p>\n<p>Alos importantly, is to use the full https:\/\/localhost line in the database so legitimate use of the word \"localhost\" isn't changed to localhost in normal text etc - but only for the web links!<\/p>\n<p>Note the forward slashes (\/) have to be escaped with a backslash in Linux () and because this site will be upgraded to HTTPS later, I'll keep the current file's HTTPS links intact.<\/p>\n<p>I use SED for this as it is fast and effective - if unforgiving of errors - like most old linux commands so be SURE you have the correct strings to search and replace before you run it!!<\/p>\n<p><span style=\"color: #0000ff;\">sed -i 's\/https:\/\/stevepedwards.today\/https:\/\/stevepedwards.today\/g' DebianAdmin.SQL<\/span><\/p>\n<p><span style=\"color: #0000ff;\">sed -i 's\/https:\/\/stevepedwards.today\/https:\/\/stevepedwards.today\/g' ElectronicsStuff.sql<\/span><\/p>\n<p>Now I can access MYSQL, create and import the WP databases, hopefully:<\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">sudo service mysql start<\/span><br \/>\n<span style=\"color: #ff0000;\">* Starting MySQL database server mysqld su: <strong>warning: cannot change directory to \/nonexistent: No such file or directory.<\/strong><\/span><\/p>\n<p>Hmm, dunno what that means? Research later...<\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">sudo mysql -u root -p<\/span><br \/>\n<span style=\"color: #ff0000;\">Enter password:<\/span><br \/>\n<span style=\"color: #ff0000;\">Welcome to the MySQL monitor. Commands end with ; or g.<\/span><br \/>\n<span style=\"color: #ff0000;\">Your MySQL connection id is 10<\/span><br \/>\n<span style=\"color: #ff0000;\">Server version: 8.0.31-0ubuntu0.20.04.1 (Ubuntu)<\/span><\/p>\n<p>Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.<\/p>\n<p><span style=\"color: #ff0000;\">mysql&gt; <span style=\"color: #0000ff;\">show databases ;<\/span><\/span><br \/>\n<span style=\"color: #ff0000;\">+--------------------+<\/span><br \/>\n<span style=\"color: #ff0000;\">| Database |<\/span><br \/>\n<span style=\"color: #ff0000;\">+--------------------+<\/span><br \/>\n<span style=\"color: #ff0000;\">| information_schema |<\/span><br \/>\n<span style=\"color: #ff0000;\">| mysql |<\/span><br \/>\n<span style=\"color: #ff0000;\">| performance_schema |<\/span><br \/>\n<span style=\"color: #ff0000;\">| sys |<\/span><br \/>\n<span style=\"color: #ff0000;\">+--------------------+<\/span><br \/>\n<span style=\"color: #ff0000;\">4 rows in set (0.02 sec)<\/span><\/p>\n<p><span style=\"color: #ff0000;\">mysql&gt; <span style=\"color: #0000ff;\">create database DebianAdmin ;<\/span><\/span><br \/>\n<span style=\"color: #ff0000;\">Query OK, 1 row affected (0.02 sec)<\/span><\/p>\n<p><span style=\"color: #ff0000;\">mysql&gt; <span style=\"color: #0000ff;\">create database ElectronicsStuff ;<\/span><\/span><br \/>\n<span style=\"color: #ff0000;\">Query OK, 1 row affected (0.00 sec)<\/span><\/p>\n<p><span style=\"color: #ff0000;\">mysql&gt; <span style=\"color: #0000ff;\">show databases ;<\/span><\/span><br \/>\n<span style=\"color: #ff0000;\">+--------------------+<\/span><br \/>\n<span style=\"color: #ff0000;\">| Database |<\/span><br \/>\n<span style=\"color: #ff0000;\">+--------------------+<\/span><br \/>\n<span style=\"color: #ff0000;\">| DebianAdmin |<\/span><br \/>\n<span style=\"color: #ff0000;\">| ElectronicsStuff |<\/span><br \/>\n<span style=\"color: #ff0000;\">| information_schema |<\/span><br \/>\n<span style=\"color: #ff0000;\">| mysql |<\/span><br \/>\n<span style=\"color: #ff0000;\">| performance_schema |<\/span><br \/>\n<span style=\"color: #ff0000;\">| sys |<\/span><br \/>\n<span style=\"color: #ff0000;\">+--------------------+<\/span><br \/>\n<span style=\"color: #ff0000;\">6 rows in set (0.00 sec)<\/span><\/p>\n<p><span style=\"color: #ff0000;\">mysql&gt; <span style=\"color: #0000ff;\">use DebianAdmin ;<\/span><\/span><br \/>\n<span style=\"color: #ff0000;\">Database changed<\/span><\/p>\n<p><span style=\"color: #0000ff;\"><span style=\"color: #ff0000;\">mysql&gt; <\/span>source \/var\/www\/DebianAdmin.SQL ;<\/span><\/p>\n<p><span style=\"color: #ff0000;\">mysql&gt;<span style=\"color: #0000ff;\"> use ElectronicsStuff ;<\/span><\/span><\/p>\n<p><span style=\"color: #ff0000;\">mysql&gt; <span style=\"color: #0000ff;\">source \/var\/www\/ElectronicsStuff.sql ;<\/span><\/span><\/p>\n<p><span style=\"color: #ff0000;\">mysql&gt; <span style=\"color: #0000ff;\">show databases ;<\/span><\/span><br \/>\n<span style=\"color: #ff0000;\">+--------------------+<\/span><br \/>\n<span style=\"color: #ff0000;\">| Database |<\/span><br \/>\n<span style=\"color: #ff0000;\">+--------------------+<\/span><br \/>\n<span style=\"color: #ff0000;\">| DebianAdmin |<\/span><br \/>\n<span style=\"color: #ff0000;\">| ElectronicsStuff |<\/span><br \/>\n<span style=\"color: #ff0000;\">| information_schema |<\/span><br \/>\n<span style=\"color: #ff0000;\">| mysql |<\/span><br \/>\n<span style=\"color: #ff0000;\">| performance_schema |<\/span><br \/>\n<span style=\"color: #ff0000;\">| sys |<\/span><br \/>\n<span style=\"color: #ff0000;\">+--------------------+<\/span><br \/>\n<span style=\"color: #ff0000;\">6 rows in set (0.00 sec)<\/span><\/p>\n<p>I have to allow access to these Dbs for my local user with my password:<\/p>\n<p><span style=\"color: #ff0000;\">mysql&gt;<span style=\"color: #0000ff;\">\u00a0<\/span><\/span><\/p>\n<p><span style=\"color: #ff0000;\"><span style=\"color: #0000ff;\">CREATE USER 'stevee'@'%' IDENTIFIED BY 'pword';<\/span><\/span><\/p>\n<p>OR:<\/p>\n<p><span style=\"color: #0000ff;\">CREATE USER 'stevee'@'localhost' IDENTIFIED BY 'pword';<\/span><\/p>\n<p><span style=\"color: #0000ff;\">DROP USER 'wronguser'@'%';<\/span><\/p>\n<p><span style=\"color: #0000ff;\">GRANT ALL on *.* TO 'stevee'@'localhost' ;<\/span><\/p>\n<p><span style=\"color: #ff0000;\">mysql&gt; <span style=\"color: #0000ff;\">SHOW GRANTS FOR 'stevee'@'localhost';<\/span><\/span><br \/>\n<span style=\"color: #ff0000;\">+--------------------------------------------------------------------------------------------------------------------------------+<\/span><br \/>\n<span style=\"color: #ff0000;\">| Grants for stevee@localhost<\/span><br \/>\n<span style=\"color: #ff0000;\">|<\/span><br \/>\n<span style=\"color: #ff0000;\">+--------------------------------------------------------------------------------------------------------------------------------+<\/span><br \/>\n<span style=\"color: #ff0000;\">| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, REFERENCES, ALTER ON *.* TO `stevee`@`localhost` WITH GRANT OPTION |<\/span><br \/>\n<span style=\"color: #ff0000;\">+--------------------------------------------------------------------------------------------------------------------------------+<\/span><br \/>\n<span style=\"color: #ff0000;\">1 row in set (0.00 sec)<\/span><\/p>\n<p>The principle user name given access here is the name that goes into wp-config.php file for that database name.<\/p>\n<p><span style=\"color: #0000ff;\"> sudo vi DebianAdmin\/wp-config.php<\/span><\/p>\n<p><span style=\"color: #ff0000;\">\/\/ ** MySQL settings - You can get this info from your web host ** \/\/<\/span><br \/>\n<span style=\"color: #ff0000;\">\/** The name of the database for WordPress *\/<\/span><br \/>\n<span style=\"color: #ff0000;\">define('DB_NAME', 'DebianAdmin');<\/span><\/p>\n<p><span style=\"color: #ff0000;\">\/** MySQL database username *\/<\/span><br \/>\n<span style=\"color: #ff0000;\">define('DB_USER', 'stevee');<\/span><\/p>\n<p><span style=\"color: #ff0000;\">\/** MySQL database password *\/<\/span><br \/>\n<span style=\"color: #ff0000;\">define('DB_PASSWORD', 'xxx');<\/span><\/p>\n<p><span style=\"color: #ff0000;\">\/** MySQL hostname *\/<\/span><br \/>\n<span style=\"color: #ff0000;\">define('DB_HOST', 'localhost');<\/span><\/p>\n<p>Now check out and test user stevee can access MYSQL:<\/p>\n<p><span style=\"color: #ff0000;\">mysql&gt; <span style=\"color: #0000ff;\">exit<\/span><\/span><br \/>\n<span style=\"color: #ff0000;\">Bye<\/span><\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">sudo mysql -u stevee -p<\/span><br \/>\n<span style=\"color: #ff0000;\">[sudo] password for stevee:<\/span><br \/>\n<span style=\"color: #ff0000;\">Enter password:<\/span><br \/>\n<span style=\"color: #ff0000;\">Welcome to the MySQL monitor. Commands end with ; or g<\/span><\/p>\n<p>Restart MYSQL:<\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">sudo service mysql restart<\/span><br \/>\n<span style=\"color: #ff0000;\">* Stopping MySQL database server mysqld [ OK ]<\/span><br \/>\n<span style=\"color: #ff0000;\">* Starting MySQL database server mysqld su: <strong>warning: cannot change directory to \/nonexistent: No such file or directory<\/strong><\/span><\/p>\n<p><strong>For issue:<\/strong><\/p>\n<p><strong>su: warning: cannot change directory to \/nonexistent: No such file or directory<\/strong><\/p>\n<p><em>\"I'd like to verify this is the problem. Here's the line from my <code>\/etc\/passwd<\/code>\u00a0with the\u00a0<code>\/nonexistent<\/code>\u00a0directory name:\u00a0<code>mysql:x:112:119:MySQL Server,,,:\/nonexistent:\/bin\/false\"<\/code><\/em><\/p>\n<p><strong>FIX - give mysql a valid directory, not \/nonexistent:<\/strong><\/p>\n<p><span style=\"color: #0000ff;\">sudo service mysql stop<\/span><\/p>\n<p><span style=\"color: #0000ff;\">sudo usermod -d \/var\/lib\/mysql\/ mysql<\/span><\/p>\n<p><span style=\"color: #0000ff;\">sudo service mysql start<\/span><\/p>\n<p>Now, mysql has a valid directory as seen in:<\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">grep --color mysql \/etc\/passwd<\/span><br \/>\n<span style=\"color: #ff0000;\">mysql:x:113:120:MySQL Server,,,:\/var\/lib\/mysql\/:\/bin\/false<\/span><\/p>\n<p><strong>To Export DBs:<\/strong><\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">sudo mysqldump -vu root -p DebianAdmin &gt; \/var\/www\/DA.sql<\/span><\/p>\n<p>Check all required web services are running:<\/p>\n<p><span style=\"color: #0000ff;\">nmap localhost<\/span><\/p>\n<p><span style=\"color: #ff0000;\">Not shown: 998 closed ports<\/span><br \/>\n<span style=\"color: #ff0000;\">PORT STATE SERVICE<\/span><br \/>\n<span style=\"color: #ff0000;\">80\/tcp open http<\/span><br \/>\n<span style=\"color: #ff0000;\">3306\/tcp open mysql<\/span><\/p>\n<p>Now input:<\/p>\n<p>localhost\/<\/p>\n<p>into your browser page to see your index.html Landing Page if you have one - it works:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/Access.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-9701 size-large\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/Access-1024x551.webp\" alt=\"\" width=\"840\" height=\"452\" srcset=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/Access-1024x551.webp 1024w, https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/Access-300x161.webp 300w, https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/Access-768x413.webp 768w, https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/Access-1536x826.webp 1536w, https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/Access-1200x645.webp 1200w, https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/Access.webp 1921w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><\/a>BUT! Access to the WP sites is not working - and notice it tried the PC name, not localhost:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/WPDown.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-9719 aligncenter\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/WPDown.png\" alt=\"\" width=\"1921\" height=\"1033\" \/><\/a><\/p>\n<p>FOR net access from PCs, edit 127.0.0.1 bind addr\u00a0 to 0.0.0.0:<\/p>\n<p># Instead of skip-networking the default is now to listen only on<br \/>\n# localhost which is more compatible and is not less secure.<br \/>\n<span style=\"color: #ff0000;\">bind-address = 0.0.0.0<\/span><\/p>\n<p><span style=\"color: #0000ff;\">sudo vi \/etc\/mysql\/mysql.conf.d\/mysqld.cnf<\/span><\/p>\n<p>Let's see what nmap says:<\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">nmap localhost<\/span><br \/>\n<span style=\"color: #ff0000;\">Starting Nmap 7.80 ( https:\/\/nmap.org ) at 2022-11-25 13:20 GMT<\/span><br \/>\n<span style=\"color: #ff0000;\">Nmap scan report for localhost (127.0.0.1)<\/span><br \/>\n<span style=\"color: #ff0000;\">Host is up (0.000022s latency).<\/span><br \/>\n<span style=\"color: #ff0000;\">Not shown: 998 closed ports<\/span><br \/>\n<span style=\"color: #ff0000;\">PORT STATE SERVICE<\/span><br \/>\n<strong><span style=\"color: #ff0000;\">80\/tcp open http<\/span><\/strong><br \/>\n<strong><span style=\"color: #ff0000;\">3306\/tcp open mysql<\/span><\/strong><\/p>\n<p>OK, so the services are running for localhost but only http for server name laptop:<\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">nmap laptop<\/span><br \/>\n<span style=\"color: #ff0000;\">Starting Nmap 7.80 ( https:\/\/nmap.org ) at 2022-11-25 13:23 GMT<\/span><br \/>\n<span style=\"color: #ff0000;\">Nmap scan report for laptop (127.0.1.1)<\/span><br \/>\n<span style=\"color: #ff0000;\">Host is up (0.000026s latency).<\/span><br \/>\n<span style=\"color: #ff0000;\">rDNS record for 127.0.1.1: laptop.localdomain<\/span><br \/>\n<span style=\"color: #ff0000;\">Not shown: 999 closed ports<\/span><br \/>\n<span style=\"color: #ff0000;\">PORT STATE SERVICE<\/span><br \/>\n<span style=\"color: #ff0000;\">80\/tcp open http<\/span><br \/>\n<span style=\"color: #ff0000;\">3306\/tcp open mysql<\/span><\/p>\n<p>That means I <em>should<\/em> have access to the WP AND Apache sites:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/CTQuizOK.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-9721\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/CTQuizOK.png\" alt=\"\" width=\"1921\" height=\"1033\" \/><\/a><\/p>\n<p>My Electronics site is partly showing so that's a WP config issue mostly, but DebianAdmin is not showing at all as it is redirecting from localhost to \"laptop\"- but still a WP config or Apache HTTPS re-direct issue, probably from the old Linux laptop Apache file settings:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/ESavail.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-9740\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/ESavail.png\" alt=\"\" width=\"1921\" height=\"1033\" \/><\/a><\/p>\n<p>I can also get local access via IP address: https:\/\/172.31.108.16\/ElectronicsStuff\/<\/p>\n<p>You can use Better Search Replace plugin to change any errant non http links that may affect things like YouTube vids not showing:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/LinksFix.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-9800 size-large\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/LinksFix.png-1024x551.png\" alt=\"\" width=\"840\" height=\"452\" srcset=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/LinksFix.png-1024x551.png 1024w, https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/LinksFix.png-300x161.png 300w, https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/LinksFix.png-768x413.png 768w, https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/LinksFix.png-1536x826.png 1536w, https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/LinksFix.webp 1921w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><\/a>I DONT have remote PC access though either by browser address name \/laptop or IP address so I cannot login as it's link is via PC name.<\/p>\n<p>Let's look at some network issues like firewall access to the network connections. This laptop only has a wifi card but no ethernet port.<\/p>\n<p>In WSL Ubuntu, unlike Mint, ifconfig does not work until net-tools is installed:<\/p>\n<p><span style=\"color: #0000ff;\">sudo apt install net-tools<\/span><\/p>\n<p><span style=\"color: #0000ff;\">ifconfig<\/span><\/p>\n<p><span style=\"color: #ff0000;\"><strong>eth0<\/strong>: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt; mtu 1500<\/span><br \/>\n<strong><span style=\"color: #ff0000;\">inet 172.31.104.71 netmask 255.255.240.0 broadcast 172.31.111.255<\/span><\/strong><\/p>\n<p>What weird IP addresses are these?? My router DHCP is set to 192.168.1.x addresses?<\/p>\n<p>Ok, some independent \/20 WSL network? Using a net calc, as my Networking skills are way overdue for a recap...like by 12 years..lol<\/p>\n<div class=\"bl558_sc w65bb\">Netmask<\/div>\n<div class=\"bl558_sc w130b\">255.255.240.0 = 20<\/div>\n<div class=\"bl558_sc w65bb\">Network<\/div>\n<div class=\"bl558_sc w130b\">172.31.96.0\/20<\/div>\n<div class=\"bl558_sc w65bb\">Broadcast<\/div>\n<div class=\"bl558_sc w130b\">172.31.111.255<\/div>\n<div class=\"bl558_sc w65bb\">First IP<\/div>\n<div class=\"bl558_sc w130b\">172.31.96.1<\/div>\n<div class=\"bl558_sc w65bb\">Last IP<\/div>\n<div class=\"bl558_sc w130b\">172.31.111.254<\/div>\n<div class=\"bl558_sc w65bb\">Hosts\/Net<\/div>\n<div class=\"bl558_sc w130b\">4094<\/div>\n<p>I only have wifi on this laptop too and WSL says it's eth0?!<\/p>\n<p>That's because WSL runs on a VM with a virtual network adaptor, so the name doesn't matter - it's just an IP gateway.<\/p>\n<p>My Win11 netcard is 192.168.1.16. Is there some WSL aliasing going on here to share the wifi adaptor? What does nmap make of it all? Interesting, neither IP addresses show mysql port 3306 so STILL will not be able to connect to my WP\/MYSQL websites:<\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">nmap 172.31.104.71<\/span><br \/>\nStarting Nmap 7.80 ( https:\/\/nmap.org ) at 2022-11-25 01:16 GMT<br \/>\n<span style=\"color: #ff0000;\">Nmap scan report for 172.31.104.71<\/span><br \/>\n<span style=\"color: #ff0000;\">Host is up (0.000065s latency).<\/span><br \/>\n<span style=\"color: #ff0000;\">Not shown: 999 closed ports<\/span><br \/>\n<span style=\"color: #ff0000;\">PORT STATE SERVICE<\/span><br \/>\n<strong><span style=\"color: #ff0000;\">80\/tcp open http<\/span><\/strong><\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">nmap 192.168.1.16 -Pn<\/span><br \/>\n<span style=\"color: #ff0000;\">Starting Nmap 7.80 ( https:\/\/nmap.org ) at 2022-11-25 01:29 GMT<\/span><br \/>\n<span style=\"color: #ff0000;\">Nmap scan report for laptop (192.168.1.16)<\/span><br \/>\n<span style=\"color: #ff0000;\">Host is up (0.00044s latency).<\/span><br \/>\n<span style=\"color: #ff0000;\">Not shown: 996 filtered ports<\/span><br \/>\n<span style=\"color: #ff0000;\">PORT STATE SERVICE<\/span><br \/>\n<strong><span style=\"color: #ff0000;\">135\/tcp open msrpc<\/span><\/strong><br \/>\n<strong><span style=\"color: #ff0000;\">139\/tcp open netbios-ssn<\/span><\/strong><br \/>\n<strong><span style=\"color: #ff0000;\">445\/tcp open microsoft-ds<\/span><\/strong><br \/>\n<strong><span style=\"color: #ff0000;\">5357\/tcp open wsdapi<\/span><\/strong><\/p>\n<p>I will need to let mysql out of the firewall at least maybe? Been a long time since I've done that shit in Windows...hmm..just for fun, lets turn it off the firewall first as the easiest thing to see what connects or not then..<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/DefendOff.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-9724\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/DefendOff.png\" alt=\"\" width=\"1019\" height=\"674\" \/><\/a><\/p>\n<p>No change for nmap on:<\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">nmap 172.31.108.16 -Pn<\/span><br \/>\nStarting Nmap 7.80 ( https:\/\/nmap.org ) at 2022-11-25 13:43 GMT<br \/>\nNmap scan report for 172.31.108.16<br \/>\nHost is up (0.000025s latency).<br \/>\nNot shown: 999 closed ports<br \/>\nPORT STATE SERVICE<br \/>\n<strong><span style=\"color: #ff0000;\">80\/tcp open http<\/span><\/strong><\/p>\n<p>The Win11 wifi IP is:<\/p>\n<p><strong><span style=\"color: #0000ff;\">Windows key + I<\/span> to open the Settings menu.<\/strong><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/WinIP.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-9726\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/WinIP.png\" alt=\"\" width=\"1202\" height=\"934\" \/><\/a><\/p>\n<p>Or, in cmd:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/IPconf.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-9758\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/IPconf.png\" alt=\"\" width=\"1115\" height=\"761\" \/><\/a><\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">nmap 192.168.1.16 -Pn<\/span><br \/>\nStarting Nmap 7.80 ( https:\/\/nmap.org ) at 2022-11-25 13:46 GMT<br \/>\nNmap scan report for laptop (192.168.1.16)<br \/>\nHost is up (0.00038s latency).<br \/>\nNot shown: 996 closed ports<br \/>\nPORT STATE SERVICE<br \/>\n<span style=\"color: #ff0000;\">135\/tcp open msrpc<\/span><br \/>\n<span style=\"color: #ff0000;\">139\/tcp open netbios-ssn<\/span><br \/>\n<span style=\"color: #ff0000;\">445\/tcp open microsoft-ds<\/span><br \/>\n<span style=\"color: #ff0000;\">5357\/tcp open wsdapi<\/span><\/p>\n<p>So, no external access to WSL via the local network at all on ports 80 or 3306...so I need to research how WSL works with the Win11 network, as even after opening up port 80 inbound\/outbound in the Firewall:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/port80.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-9728 aligncenter\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/port80.png\" alt=\"\" width=\"970\" height=\"881\" \/><\/a><\/p>\n<p>I did ports for both In and OUT Rules:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/DefRules.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-9733\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/DefRules.png\" alt=\"\" width=\"1562\" height=\"88\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>There is also the UFW firewall on Ubuntu, so disable that too:<\/p>\n<p><span style=\"color: #0000ff;\">sudo ufw disable<\/span><\/p>\n<p><span style=\"color: #ff0000;\">Firewall stopped and disabled on system startup<\/span><\/p>\n<p>This still doesn't allow any different access than before:<\/p>\n<p>stevee@laptop:\/var\/www$<span style=\"color: #0000ff;\"> nmap 192.168.1.16 -Pn<\/span><br \/>\nStarting Nmap 7.80 ( https:\/\/nmap.org ) at 2022-11-25 13:57 GMT<br \/>\nNmap scan report for laptop (192.168.1.16)<br \/>\nHost is up (0.00059s latency).<br \/>\nNot shown: 996 filtered ports<br \/>\nPORT STATE SERVICE<br \/>\n<span style=\"color: #ff0000;\">135\/tcp open msrpc<\/span><br \/>\n<span style=\"color: #ff0000;\">139\/tcp open netbios-ssn<\/span><br \/>\n<span style=\"color: #ff0000;\">445\/tcp open microsoft-ds<\/span><br \/>\n<span style=\"color: #ff0000;\">5357\/tcp open wsdapi<\/span><\/p>\n<p>Research time...ho hum - nothing is or was ever simple in Windows networking...<\/p>\n<p>For now I'll continue with the SSL and upgrading the PHP version as this site was running on PHP8.0 on the Linux laptop as that may clear up the local re-direct and HTTPS link issues inside the WP site docs.<\/p>\n<p>The PPA is maintained by\u00a0<a href=\"https:\/\/deb.sury.org\/\" rel=\"noreferrer\">Ond?ej Sur\u00fd<\/a>, a Debian developer who has been packaging PHP for Debian since PHP 5.<\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">php -v<\/span><br \/>\n<span style=\"color: #ff0000;\"><strong>PHP 7.4.3<\/strong> (cli) (built: Nov 2 2022 09:53:44) ( NTS )<\/span><br \/>\n<span style=\"color: #ff0000;\">Copyright (c) The PHP Group<\/span><br \/>\n<span style=\"color: #ff0000;\">Zend Engine v3.4.0, Copyright (c) Zend Technologies<\/span><br \/>\n<span style=\"color: #ff0000;\">with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies<\/span><\/p>\n<p><span style=\"color: #0000ff;\">sudo apt-add-repository ppa:ondrej\/php<\/span><\/p>\n<p><span style=\"color: #0000ff;\">sudo apt update &amp;&amp; sudo apt upgrade<\/span><\/p>\n<p><span style=\"color: #0000ff;\">sudo apt install php8.0<\/span><\/p>\n<p><span style=\"color: #0000ff;\">sudo apt autoremove<\/span><\/p>\n<p>Ah, I see it just goes to ver8.1 not 8.0.<\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">php -v<\/span><br \/>\n<span style=\"color: #ff0000;\"><strong>PHP 8.1.12<\/strong> (cli) (built: Oct 28 2022 17:39:37) (NTS)<\/span><br \/>\n<span style=\"color: #ff0000;\">Copyright (c) The PHP Group<\/span><br \/>\n<span style=\"color: #ff0000;\">Zend Engine v4.1.12, Copyright (c) Zend Technologies<\/span><br \/>\n<span style=\"color: #ff0000;\">with Zend OPcache v8.1.12, Copyright (c), by Zend Technologies<\/span><\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">sudo a2dismod php7.4<\/span><br \/>\n<span style=\"color: #ff0000;\">Module php7.4 disabled.<\/span><\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">sudo a2enmod php8.0<\/span><br \/>\n<span style=\"color: #ff0000;\">Enabling module php8.0.<\/span><br \/>\n<span style=\"color: #ff0000;\">To activate the new configuration, you need to run:<\/span><br \/>\n<span style=\"color: #0000ff;\">sudo service apache2 restart<\/span><\/p>\n<p>To see WP errors, set DEBUG true in wp-config.php:<\/p>\n<p><span style=\"color: #ff0000;\">define('WP_DEBUG', true);<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/MissingExt.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-9741\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/MissingExt.png\" alt=\"\" width=\"1340\" height=\"219\" \/><\/a><\/p>\n<p>The bloody Chrome caching oh dear!s up testing SO much!! In Incognito mode, BOTH sites are suffering from the same missing extension issue! Damn..going backwards here.<\/p>\n<p>The php-mysql extension WAS installed earlier, so I don't know why it's complaining..? But it IS missing mysqli.ini here.<\/p>\n<p>Compare the PHP details of old and new sites in the browser - you can see mysqli.ini is missing from this new install in phpinfo.php:<\/p>\n<p>https:\/\/stevepedwards.today\/phpinfo.php; https:\/\/stevepedwards.today\/phpinfo.php<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/PHPSitesDiffs.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-9752\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/PHPSitesDiffs.png\" alt=\"\" width=\"1905\" height=\"941\" \/><\/a><\/p>\n<p>To create a phpinfo file, in your root Apache2 html directory (\/var\/www\/ in my case) create an empty file:<\/p>\n<p><span style=\"color: #0000ff;\">vi phpinfo.php\u00a0<\/span><\/p>\n<p>and type or copy into it:<\/p>\n<p><span style=\"color: #ff0000;\">&lt;?php<\/span><br \/>\n<span style=\"color: #ff0000;\">phpinfo();<\/span><br \/>\n<span style=\"color: #ff0000;\">?&gt;<\/span><\/p>\n<p>If you TAB the command:<\/p>\n<p><span style=\"color: #0000ff;\">sudo apt install php-<\/span><\/p>\n<p>you will see all the php extensions available for install. Not that it helps ATM, but handy to know when the WP Site Health complains you have extension like GD missing, so you can search for them with this command and install what's missing e.g:<\/p>\n<p><span style=\"color: #0000ff;\"> sudo apt install php-gd<\/span><\/p>\n<p>Ah! I was trying to remember the extension command because I used it last week, but it's specific to the PHP version! It's<\/p>\n<p><span style=\"color: #0000ff;\"> sudo apt-get install php8.0-mysql<\/span><\/p>\n<p>Has it helped? No.<\/p>\n<p>But if you get Site Health complaints like:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/Missing.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-9802 aligncenter\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/Missing.png\" alt=\"\" width=\"870\" height=\"493\" \/><\/a><\/p>\n<p>You can add these missing extensions by using the php version based command of php-mysqlXX and Tabbing to complete the extension options - especially if marked Critical with a red X, as it may be why your site isn't fully functional:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/php8Tab.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-9803\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/php8Tab.png\" alt=\"\" width=\"1029\" height=\"324\" \/><\/a><\/p>\n<p>You may have to restart Apache to remove the extension warning after install, as Shift-F5 cache refresh did not work to re-read the database state.<\/p>\n<p>The 8.1 version is already installed - so what version IS running exactly?<\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">php -v<\/span><br \/>\n<span style=\"color: #ff0000;\">PHP 8.1.12 (cli) (built: Oct 28 2022 17:39:37) (NTS)<\/span><br \/>\n<span style=\"color: #ff0000;\">Copyright (c) The PHP Group<\/span><br \/>\n<span style=\"color: #ff0000;\">Zend Engine v4.1.12, Copyright (c) Zend Technologies<\/span><br \/>\n<span style=\"color: #ff0000;\">with Zend OPcache v8.1.12, Copyright (c), by Zend Technologies<\/span><\/p>\n<p>Ok, let's downgrade to 8.0 as that was what the WP site was running fine on before export using this Post:<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"enecNWtRE9\"><p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/downgrading-php-versions\/\">Downgrading PHP Versions<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"\"Downgrading PHP Versions\" &#8212; Linux Admin, WebDev, Comms &amp; IT\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/downgrading-php-versions\/embed\/#?secret=FNzNfI25um#?secret=enecNWtRE9\" data-secret=\"enecNWtRE9\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>Install the required dependencies.<\/p>\n<p><span style=\"color: #0000ff;\">sudo apt install software-properties-common ca-certificates lsb-release apt-transport-http<\/span><\/p>\n<p>Add the required PPA<\/p>\n<p><span style=\"color: #0000ff;\">sudo add-apt-repository ppa:ondrej\/php<\/span><\/p>\n<p>Update the Apt package manager<\/p>\n<p><span style=\"color: #0000ff;\">sudo apt update<\/span><br \/>\nInstall PHP 8.0 and all the PHP modules for Drupal 9.<\/p>\n<p><span style=\"color: #0000ff;\">sudo apt install php8.0<\/span><br \/>\n<span style=\"color: #0000ff;\">sudo apt install php8.0-mysql php8.0-mbstring php8.0-xml php8.0-curl php8.0-gd<\/span><\/p>\n<p>Switch PHP versions and enable PHP 8.0<br \/>\nSet 8.09 as the default PHP version for CLI and Apache.<\/p>\n<p>Command Line PHP:<br \/>\n<span style=\"color: #0000ff;\">sudo update-alternatives --config php<\/span><br \/>\nSelect php8.0 from the list with the available options:<\/p>\n<p>There are 2 choices for the alternative php (providing \/usr\/bin\/php).<br \/>\nSelection Path Priority Status<br \/>\n------------------------------------------------------------<br \/>\n<span style=\"color: #ff0000;\">0 \/usr\/bin\/php8.1 81 auto mode<\/span><br \/>\n<span style=\"color: #ff0000;\">* 1 \/usr\/bin\/php8.0 80 manual mode<\/span><br \/>\n<span style=\"color: #ff0000;\">2 \/usr\/bin\/php8.1 81 manual mode<\/span><br \/>\n<span style=\"color: #ff0000;\">Press &lt;enter&gt; to keep the current choice[*], or type selection number:<\/span><\/p>\n<p>Disable PHP 8.1<\/p>\n<p><span style=\"color: #0000ff;\">sudo a2dismod php8.1<\/span><br \/>\n<span style=\"color: #0000ff;\">sudo service apache2 restart <\/span><\/p>\n<p>Enable PHP 8.0<\/p>\n<p><span style=\"color: #0000ff;\">sudo a2enmod php8.0 <\/span><br \/>\n<span style=\"color: #0000ff;\">sudo service apache2 restart<\/span><\/p>\n<p>Verify PHP Version<br \/>\n<span style=\"color: #0000ff;\">php -v<\/span><\/p>\n<p><span style=\"color: #ff0000;\">PHP 8.0.18 (cli) (built: May 1 2022 04:42:09) ( NTS )<\/span><br \/>\n<span style=\"color: #ff0000;\">Copyright (c) The PHP Group<\/span><br \/>\n<span style=\"color: #ff0000;\">Zend Engine v4.0.18, Copyright (c) Zend Technologies<\/span><br \/>\n<span style=\"color: #ff0000;\">with Zend OPcache v8.0.18, Copyright (c), by Zend Technologies<\/span><br \/>\n<span style=\"color: #ff0000;\">For verifying the PHP version Apache uses, specify the configururation .ini file.<\/span><\/p>\n<p><span style=\"color: #0000ff;\">php -c \/etc\/php\/apache2\/php.ini -v<\/span><\/p>\n<p>Yes! Now there is WP site access:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/DAaccess.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-9779\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/DAaccess.png\" alt=\"\" width=\"1921\" height=\"1033\" \/><\/a><\/p>\n<p>ElectronicsStuff still not displaying properly but that IS a WP config issue:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/ESaccess.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-9780\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/ESaccess.png\" alt=\"\" width=\"1921\" height=\"1033\" \/><\/a><\/p>\n<p>Also, the errant extension now shows in phpinfo.php:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/PHPsqliniext.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-9788\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/PHPsqliniext.png\" alt=\"\" width=\"1921\" height=\"1033\" \/><\/a><\/p>\n<p>I'll move on to the network stuff.<\/p>\n<p>I need better name resolution to see other PCs on the net from this WSL install if possible, as I can't ping localhost PC by name - see if this old Linux\/Win net name method works? - add wins to:<\/p>\n<p><span style=\"color: #0000ff;\">sudo vi \/etc\/nsswitch.conf<\/span><\/p>\n<p><span style=\"color: #ff0000;\">hosts: <strong>wins<\/strong> files dns<\/span><\/p>\n<p><span style=\"color: #0000ff;\">sudo winbindd<\/span><\/p>\n<p>Also add the PC name to the hosts file to see if that helps name resolution - though I think the WSL IP changes periodically or at each session?:<\/p>\n<p><span style=\"color: #ff0000;\">127.0.0.1 localhost laptop<\/span><br \/>\n<span style=\"color: #ff0000;\">127.0.1.1 laptop.localdomain laptop<\/span><br \/>\n<span style=\"color: #ff0000;\">192.168.1.16 laptop<\/span><br \/>\n<span style=\"color: #ff0000;\">192.168.1.11 localhost<\/span><br \/>\n<span style=\"color: #ff0000;\">172.31.108.16 laptop<\/span><\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">nmap localhost<\/span><br \/>\nStarting Nmap 7.80 ( https:\/\/nmap.org ) at 2022-11-25 17:31 GMT<br \/>\n<span style=\"color: #ff0000;\">Nmap scan report for localhost (192.168.1.11)<\/span><br \/>\n<span style=\"color: #ff0000;\">Host is up (0.89s latency).<\/span><br \/>\n<span style=\"color: #ff0000;\">Not shown: 993 closed ports<\/span><br \/>\n<span style=\"color: #ff0000;\">PORT STATE SERVICE<\/span><br \/>\n<span style=\"color: #ff0000;\">21\/tcp open ftp<\/span><br \/>\n<span style=\"color: #ff0000;\">22\/tcp open ssh<\/span><br \/>\n<span style=\"color: #ff0000;\">80\/tcp open http<\/span><br \/>\n<span style=\"color: #ff0000;\">139\/tcp open netbios-ssn<\/span><br \/>\n<span style=\"color: #ff0000;\">443\/tcp open http<\/span><br \/>\n<span style=\"color: #ff0000;\">445\/tcp open microsoft-ds<\/span><br \/>\n<span style=\"color: #ff0000;\">3306\/tcp open mysql<\/span><\/p>\n<p>OK, some name resolution is working now.<\/p>\n<p>Hmmm, doesn't find other Win PC's on the whole local net by name or IP - but now it has seen the router and my Linux PC which have open SSL ports 443 for HTTPS.<\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">nmap 192.168.1.0\/24<\/span><br \/>\n<span style=\"color: #ff0000;\">Starting Nmap 7.80 ( https:\/\/nmap.org ) at 2022-11-25 16:41 GMT<\/span><br \/>\n<span style=\"color: #ff0000;\">Nmap scan report for <strong>192.168.1.1<\/strong><\/span><br \/>\n<span style=\"color: #ff0000;\">Host is up (0.0027s latency).<\/span><br \/>\n<span style=\"color: #ff0000;\">Not shown: 994 filtered ports<\/span><br \/>\n<span style=\"color: #ff0000;\">PORT STATE SERVICE<\/span><br \/>\n<span style=\"color: #ff0000;\">21\/tcp open ftp<\/span><br \/>\n<span style=\"color: #ff0000;\">22\/tcp open ssh<\/span><br \/>\n<span style=\"color: #ff0000;\">23\/tcp open telnet<\/span><br \/>\n<span style=\"color: #ff0000;\">80\/tcp open http<\/span><br \/>\n<strong><span style=\"color: #ff0000;\">443\/tcp open http<\/span><\/strong><br \/>\n<span style=\"color: #ff0000;\">445\/tcp open microsoft-ds<\/span><\/p>\n<p><span style=\"color: #ff0000;\">Nmap scan report for <strong>192.168.1.11<\/strong><\/span><br \/>\n<span style=\"color: #ff0000;\">Host is up (0.0020s latency).<\/span><br \/>\n<span style=\"color: #ff0000;\">Not shown: 993 closed ports<\/span><br \/>\n<span style=\"color: #ff0000;\">PORT STATE SERVICE<\/span><br \/>\n<span style=\"color: #ff0000;\">21\/tcp open ftp<\/span><br \/>\n<span style=\"color: #ff0000;\">22\/tcp open ssh<\/span><br \/>\n<span style=\"color: #ff0000;\">80\/tcp open http<\/span><br \/>\n<span style=\"color: #ff0000;\">139\/tcp open netbios-ssn<\/span><br \/>\n<strong><span style=\"color: #ff0000;\">443\/tcp open http<\/span><\/strong><br \/>\n<span style=\"color: #ff0000;\">445\/tcp open microsoft-ds<\/span><br \/>\n<span style=\"color: #ff0000;\">3306\/tcp open mysql<\/span><\/p>\n<p><span style=\"color: #ff0000;\">Nmap done: 256 IP addresses (2 hosts up) scanned in 8.02 seconds<\/span><\/p>\n<p>As these .sql files came from an SSL secure PC, I'll press on with self signed Certs from this Post here:<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"j2sWNwuQ84\"><p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/ssl-on-ubuntu-apache2-creating-self-signed-certificates-checking-ssl-traffic-with-tcpdump-and-wireshark\/\">SSL on Ubuntu Apache2 &#8211; Creating Self Signed Certificates, Checking SSL Traffic with TCPDUMP and Wireshark<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"\"SSL on Ubuntu Apache2 &#8211; Creating Self Signed Certificates, Checking SSL Traffic with TCPDUMP and Wireshark\" &#8212; Linux Admin, WebDev, Comms &amp; IT\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/ssl-on-ubuntu-apache2-creating-self-signed-certificates-checking-ssl-traffic-with-tcpdump-and-wireshark\/embed\/#?secret=UYfEpFTAca#?secret=j2sWNwuQ84\" data-secret=\"j2sWNwuQ84\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p><strong>Step 1:<\/strong> This step before amending \/etc\/apache2\/sites-available\/default-ssl.conf:<\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">sudo a2enmod ssl<\/span><br \/>\n<span style=\"color: #ff0000;\">sudo: unable to resolve host laptop: System error<\/span><br \/>\n<span style=\"color: #ff0000;\">Considering dependency setenvif for ssl:<\/span><br \/>\n<span style=\"color: #ff0000;\">Module setenvif already enabled<\/span><br \/>\n<span style=\"color: #ff0000;\">Considering dependency mime for ssl:<\/span><br \/>\n<span style=\"color: #ff0000;\">Module mime already enabled<\/span><br \/>\n<span style=\"color: #ff0000;\">Considering dependency socache_shmcb for ssl:<\/span><br \/>\n<span style=\"color: #ff0000;\">Enabling module socache_shmcb.<\/span><br \/>\n<span style=\"color: #ff0000;\">Enabling module ssl.<\/span><br \/>\n<span style=\"color: #ff0000;\">See \/usr\/share\/doc\/apache2\/README.Debian.gz on how to configure SSL and create self-signed certificates.<\/span><br \/>\n<span style=\"color: #ff0000;\">To activate the new configuration, you need to run:<\/span><br \/>\n<span style=\"color: #ff0000;\">service apache2 restart<\/span><\/p>\n<p><strong>Step 2<\/strong> \u2013 Creating the SSL Certificate - you can insert junk text inhere except for the server name, as it's not a real cert, or checked by a cert auth:<\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout \/etc\/ssl\/private\/apache-selfsigned.key -out \/etc\/ssl\/certs\/apache-selfsigned.crt<\/span><br \/>\n<span style=\"color: #ff0000;\">sudo: unable to resolve host laptop: System error<\/span><br \/>\n<span style=\"color: #ff0000;\">Generating a RSA private key<\/span><br \/>\n<span style=\"color: #ff0000;\">........................................+++++<\/span><br \/>\n<span style=\"color: #ff0000;\">............................+++++<\/span><br \/>\n<span style=\"color: #ff0000;\">writing new private key to '\/etc\/ssl\/private\/apache-selfsigned.key'<\/span><br \/>\n<span style=\"color: #ff0000;\">-----<\/span><br \/>\n<span style=\"color: #ff0000;\">You are about to be asked to enter information that will be incorporated<\/span><br \/>\n<span style=\"color: #ff0000;\">into your certificate request.<\/span><br \/>\n<span style=\"color: #ff0000;\">What you are about to enter is what is called a Distinguished Name or a DN.<\/span><br \/>\n<span style=\"color: #ff0000;\">There are quite a few fields but you can leave some blank<\/span><br \/>\n<span style=\"color: #ff0000;\">For some fields there will be a default value,<\/span><br \/>\n<span style=\"color: #ff0000;\">If you enter '.', the field will be left blank.<\/span><br \/>\n<span style=\"color: #ff0000;\">-----<\/span><br \/>\n<span style=\"color: #ff0000;\">Country Name (2 letter code) [AU]:UK<\/span><br \/>\n<span style=\"color: #ff0000;\">State or Province Name (full name) [Some-State]:sdf<\/span><br \/>\n<span style=\"color: #ff0000;\">Locality Name (eg, city) []:sdf<\/span><br \/>\n<span style=\"color: #ff0000;\">Organization Name (eg, company) [Internet Widgits Pty Ltd]:sdf<\/span><br \/>\n<span style=\"color: #ff0000;\">Organizational Unit Name (eg, section) []:sdf<\/span><br \/>\n<span style=\"color: #ff0000;\">Common Name (e.g. server FQDN or YOUR name) []:<strong>laptop<\/strong><\/span><br \/>\n<span style=\"color: #ff0000;\">Email Address []:asdf@sdf<\/span><\/p>\n<p><span style=\"color: #0000ff;\">ls \/etc\/ssl\/certs\/apache-selfsigned.crt -l<\/span><br \/>\n<span style=\"color: #ff0000;\">-rw-r--r-- 1 root root 1359 Nov 25 19:21 \/etc\/ssl\/certs\/apache-selfsigned.crt<\/span><\/p>\n<p><strong>Step 3<\/strong> \u2013 Configuring Apache to Use SSL - create a local server named conf file:<\/p>\n<p><span style=\"color: #0000ff;\">cd \/etc\/apache2\/sites-available<\/span><\/p>\n<p>stevee@laptop:\/etc\/apache2\/sites-available$<span style=\"color: #0000ff;\"> ls<\/span><br \/>\n<span style=\"color: #ff0000;\">000-default.conf default-ssl.conf<\/span><\/p>\n<p>Make an empty conf file for your new SSL site with your server name:<\/p>\n<p>stevee@localhost:\/etc\/apache2\/sites-available$<span style=\"color: #0000ff;\"> sudo touch laptop.conf<\/span><\/p>\n<p>stevee@laptop:\/etc\/apache2\/sites-available$ <span style=\"color: #0000ff;\">ls<\/span><br \/>\n<span style=\"color: #ff0000;\">000-default.conf <strong>laptop.conf<\/strong> default-ssl.conf<\/span><\/p>\n<p>stevee@laptop:\/etc\/apache2\/sites-available$ <span style=\"color: #0000ff;\">sudo a2ensite<\/span><br \/>\n<span style=\"color: #ff0000;\">sudo: unable to resolve host laptop: System error<\/span><br \/>\n<span style=\"color: #ff0000;\">Your choices are: 000-default default-ssl laptop<\/span><br \/>\n<span style=\"color: #ff0000;\">Which site(s) do you want to enable (wildcards ok)?<\/span><br \/>\n<strong><span style=\"color: #ff0000;\">laptop<\/span><\/strong><br \/>\n<span style=\"color: #ff0000;\">Enabling site laptop.<\/span><br \/>\n<span style=\"color: #ff0000;\">To activate the new configuration, you need to run:<\/span><br \/>\n<span style=\"color: #0000ff;\">sudo service apache2 reload<\/span><\/p>\n<p>Add the following red settings to your empty site file to suit your site and folders where you created the certificates :<\/p>\n<p><span style=\"color: #0000ff;\">sudo vi \/etc\/apache2\/sites-available\/laptop.conf<\/span><\/p>\n<p><span style=\"color: #ff0000;\">&lt;IfModule mod_ssl.c&gt;<\/span><br \/>\n<span style=\"color: #ff0000;\"><strong>&lt;VirtualHost *:443&gt;<\/strong><\/span><br \/>\n<span style=\"color: #ff0000;\">ServerAdmin webmaster@localhost<\/span><br \/>\n<span style=\"color: #ff0000;\">ServerName laptop<\/span><br \/>\n<span style=\"color: #ff0000;\">DocumentRoot \/var\/www<\/span><\/p>\n<p><span style=\"color: #ff0000;\"><strong>SSLEngine on<\/strong><\/span><br \/>\n<span style=\"color: #ff0000;\"><strong>SSLCertificateFile \/etc\/ssl\/certs\/apache-selfsigned.crt<\/strong><\/span><br \/>\n<span style=\"color: #ff0000;\"><strong>SSLCertificateKeyFile \/etc\/ssl\/private\/apache-selfsigned.key<\/strong><\/span><br \/>\n<span style=\"color: #ff0000;\">&lt;\/VirtualHost&gt;<\/span><\/p>\n<p>stevee@laptop:\/etc\/apache2\/sites-available$ <span style=\"color: #0000ff;\">sudo apache2ctl configtest<\/span><br \/>\n<span style=\"color: #ff0000;\">sudo: unable to resolve host laptop: System error<\/span><br \/>\n<span style=\"color: #ff0000;\">Syntax OK<\/span><\/p>\n<p><strong>Step 4<\/strong> \u2014 Redirecting HTTP to HTTPS<\/p>\n<p><span style=\"color: #0000ff;\">sudo vi \/etc\/apache2\/sites-enabled\/000-default.conf<\/span><\/p>\n<p><span style=\"color: #ff0000;\">&lt;VirtualHost *:80&gt;<\/span><\/p>\n<p><span style=\"color: #ff0000;\">ServerAdmin webmaster@localhost<\/span><br \/>\n<span style=\"color: #ff0000;\">ServerName <strong>localhost<\/strong><\/span><br \/>\n<span style=\"color: #ff0000;\">DocumentRoot \/var\/www<\/span><br \/>\n<strong><span style=\"color: #ff0000;\">Redirect \/ https:\/\/stevepedwards.today\/<\/span><\/strong><\/p>\n<p><span style=\"color: #ff0000;\">Alias \"DebianAdmin\" \"\/var\/www\/DebianAdmin\"<\/span><br \/>\n<span style=\"color: #ff0000;\">Alias \"ElectronicsStuff\" \"\/var\/www\/ElectronicsStuff\"<\/span><\/p>\n<p>stevee@laptop:\/etc\/apache2\/sites-available$ <span style=\"color: #0000ff;\">sudo service apache2 start<\/span><br \/>\n<span style=\"color: #ff0000;\">sudo: unable to resolve host laptop: System error<\/span><br \/>\n<span style=\"color: #ff0000;\">* Starting Apache httpd web server apache2<\/span><\/p>\n<p>The change to the hosts file now resolves for nmap:<\/p>\n<p>stevee@laptop:\/etc\/apache2\/sites-available$ <span style=\"color: #0000ff;\">nmap localhost<\/span><br \/>\n<span style=\"color: #ff0000;\">Starting Nmap 7.80 ( https:\/\/nmap.org ) at 2022-11-25 20:06 GMT<\/span><br \/>\n<span style=\"color: #ff0000;\">Nmap scan report for localhost (127.0.0.1)<\/span><br \/>\n<span style=\"color: #ff0000;\">Host is up (0.000026s latency).<\/span><br \/>\n<span style=\"color: #ff0000;\">Not shown: 995 closed ports<\/span><br \/>\n<span style=\"color: #ff0000;\">PORT STATE SERVICE<\/span><br \/>\n<span style=\"color: #ff0000;\">80\/tcp open http<\/span><br \/>\n<span style=\"color: #ff0000;\">139\/tcp open netbios-ssn<\/span><br \/>\n<span style=\"color: #ff0000;\">443\/tcp open http<\/span><br \/>\n<span style=\"color: #ff0000;\">445\/tcp open microsoft-ds<\/span><br \/>\n<span style=\"color: #ff0000;\">3306\/tcp open mysql<\/span><\/p>\n<p>In principle the WP sites should be accessible via SSL if not for the WP Extension problem.<\/p>\n<p>For now - that's as good as it gets until I've researched how to to resolve the <span style=\"color: #ff0000;\">sudo: unable to resolve host laptop: System error\u00a0<\/span>and allow net access to WSL from my local net - whether it's config or firewall or just typical of Windows to NOT allow full functionality of Linux without MANY hoops to junp - especially as it's hosted on their terms. Nothing is ever straight forward!<\/p>\n<p>Found this - I also unblocked the inbound connections too:<\/p>\n<h2>How do I allow WSL through my firewall?<\/h2>\n<p>This way you will allow connections from WSL while still having the firewall protect your computer from external threats.<\/p>\n<ul>\n<li>Go to Firewall Settings and click on Advanced Settings.<\/li>\n<li>Click Windows Defender Firewall Properties.<\/li>\n<li>Select Public Profile tab.<\/li>\n<li>Click Customize Protected network connections.<\/li>\n<li>Unclick vEthernet (WSL)<\/li>\n<\/ul>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/FW.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-9773 aligncenter\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/FW.png\" alt=\"\" width=\"836\" height=\"952\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/WSLEth0.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-9774 aligncenter\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/WSLEth0.png\" alt=\"\" width=\"841\" height=\"683\" \/><\/a><\/p>\n<p>After a reboot I have name resolution for host laptop and all required WP site services showing:<\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">nmap laptop<\/span><br \/>\nStarting Nmap 7.80 ( https:\/\/nmap.org ) at 2022-11-25 22:37 GMT<br \/>\n<span style=\"color: #ff0000;\">Nmap scan report for laptop (127.0.1.1)<\/span><br \/>\n<span style=\"color: #ff0000;\">Host is up (0.000032s latency).<\/span><br \/>\n<span style=\"color: #ff0000;\">rDNS record for 127.0.1.1: laptop.localdomain<\/span><br \/>\n<span style=\"color: #ff0000;\">Not shown: 997 closed ports<\/span><br \/>\n<span style=\"color: #ff0000;\">PORT STATE SERVICE<\/span><br \/>\n<strong><span style=\"color: #ff0000;\">80\/tcp open http<\/span><\/strong><br \/>\n<strong><span style=\"color: #ff0000;\">443\/tcp open http<\/span><\/strong><br \/>\n<strong><span style=\"color: #ff0000;\">3306\/tcp open mysql<\/span><\/strong><\/p>\n<p>So that hasn't worked for local net access, but this laptop only has wifi so I'll unclick wifi also on the Public Profile - this was all reset after the reboot anyway! I decided to unclick Public, Private and Domain profiles for wifi and WSL. Can I connect from a net PC now??? No! Getting really oh dear!ed off with the Windows bulshit factor now...<\/p>\n<p>A static IP will have to be assigned to the WSL virtual netcard to stop the change every reboot:<\/p>\n<ol dir=\"auto\">\n<li>\n<p dir=\"auto\">Assign a new IP address to the virtual NIC in WSL2<\/p>\n<p dir=\"auto\">Assign the virtual ethernet NIC an additional IP address\u00a0<code>192.168.1.2<\/code>:<\/p>\n<p dir=\"auto\"><code>sudo ip addr add 192.168.1.2\/24 broadcast 192.168.2.255 dev eth0 label eth0:1<\/code><\/p>\n<p dir=\"auto\">To remove in the future:<\/p>\n<p dir=\"auto\"><code>sudo ip addr del 192.168.1.201\/24 dev eth0:1<\/code><\/p>\n<\/li>\n<\/ol>\n<p>stevee@laptop:\/var\/www$<span style=\"color: #0000ff;\"> ifconfig<\/span><br \/>\n<span style=\"color: #ff0000;\">eth0: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt; mtu 1500<\/span><br \/>\n<span style=\"color: #ff0000;\">inet 172.31.105.158 netmask 255.255.240.0 broadcast 172.31.111.255nma<\/span><br \/>\n<span style=\"color: #ff0000;\">inet6 fe80::215:5dff:fe35:4e75 prefixlen 64 scopeid 0x20&lt;link&gt;<\/span><br \/>\n<span style=\"color: #ff0000;\">ether 00:15:5d:35:4e:75 txqueuelen 1000 (Ethernet)<\/span><br \/>\n<span style=\"color: #ff0000;\">RX packets 1676 bytes 1452320 (1.4 MB)<\/span><br \/>\n<span style=\"color: #ff0000;\">RX errors 0 dropped 0 overruns 0 frame 0<\/span><br \/>\n<span style=\"color: #ff0000;\">TX packets 1033 bytes 118230 (118.2 KB)<\/span><br \/>\n<span style=\"color: #ff0000;\">TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0<\/span><\/p>\n<p><span style=\"color: #ff0000;\">eth0:1: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt; mtu 1500<\/span><br \/>\n<span style=\"color: #ff0000;\">inet 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.2.255<\/span><br \/>\n<span style=\"color: #ff0000;\">ether 00:15:5d:35:4e:75 txqueuelen 1000 (Ethernet)<\/span><\/p>\n<p>This shows the required services for WP also:<\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">nmap 192.168.1.2<\/span><br \/>\nStarting Nmap 7.80 ( https:\/\/nmap.org ) at 2022-11-25 22:59 GMT<br \/>\n<span style=\"color: #ff0000;\">Nmap scan report for 192.168.1.2<\/span><br \/>\n<span style=\"color: #ff0000;\">Host is up (0.000029s latency).<\/span><br \/>\n<span style=\"color: #ff0000;\">Not shown: 997 closed ports<\/span><br \/>\n<span style=\"color: #ff0000;\">PORT STATE SERVICE<\/span><br \/>\n<span style=\"color: #ff0000;\">80\/tcp open http<\/span><br \/>\n<span style=\"color: #ff0000;\">443\/tcp open http<\/span><br \/>\n<span style=\"color: #ff0000;\">3306\/tcp open mysql<\/span><\/p>\n<p>Still can't get past Windows pissing firewall though! Arseholes!! At least WSL ufw has stayed disabled:<\/p>\n<p>stevee@laptop:\/var\/www$ <span style=\"color: #0000ff;\">sudo ufw status<\/span><br \/>\n<span style=\"color: #ff0000;\">Status: inactive<\/span><\/p>\n<p>On reboot the \/etc\/hosts file is regenerated - it says:<\/p>\n<p># This file was automatically generated by WSL. <span style=\"color: #ff0000;\">To stop automatic generation of this file, add the following entry to \/etc\/wsl.conf:<\/span><br \/>\n<span style=\"color: #ff0000;\"># [network]<\/span><br \/>\n<span style=\"color: #ff0000;\"># generateHosts = false<\/span><br \/>\n127.0.0.1 localhost<br \/>\n127.0.1.1 laptop.localdomain laptop<\/p>\n<p>So, I added:<\/p>\n<p><span style=\"color: #0000ff;\">sudo vi \/etc\/wsl.conf<\/span><\/p>\n<p><span style=\"color: #ff0000;\"># [network]<\/span><br \/>\n<span style=\"color: #ff0000;\"># generateHosts = false<\/span><br \/>\n<span style=\"color: #ff0000;\">127.0.0.1 localhost<\/span><br \/>\n<span style=\"color: #ff0000;\">127.0.1.1 laptop.localdomain laptop<\/span><br \/>\n<span style=\"color: #ff0000;\">192.168.1.2 laptop<\/span><\/p>\n<p>STILL cannot access sites at 192.168.1.2...<\/p>\n<ol dir=\"auto\">\n<li>\n<p dir=\"auto\">Set up Windows firewall allow rule\u00a0<em>(once only)<\/em><\/p>\n<p dir=\"auto\">The\u00a0<code>vEthernet (WSL)<\/code>\u00a0network device uses the\u00a0<code>Public<\/code>\u00a0Windows network profile, where all traffic is blocked by default. We need to allow traffic from the new\u00a0<code>192.168.1.0\/24<\/code>\u00a0subnet to access the host Windows machine from WSL2.<\/p>\n<ol dir=\"auto\">\n<li>Open Windows Defender Firewall with Advanced Security<\/li>\n<li>In Inbound rules, add a new Inbound Rule\n<ol dir=\"auto\">\n<li>Select \"Custom Rule\"<\/li>\n<li>Select \"All programs\"<\/li>\n<li>Select \"Any\" Protocol Type<\/li>\n<li>Scope to remote IP addresses\u00a0<code>192.168.1.0\/24<\/code><\/li>\n<li>Select \"Allow the connection\"<\/li>\n<li>Select only \"Public\" for the rule to apply<\/li>\n<li>Name\u00a0<code>WSL2<\/code>\u00a0or similar<\/li>\n<\/ol>\n<\/li>\n<li>In Inbound rules, remove any existing block rules for applications that WSL2 needs to access, as these will take precedence over the allow rule. These are usually created by Windows when you first run an application (the UAC modal warning asking you about firewall rules sets these up).<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/WSLFWInrule.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-9790\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2022\/11\/WSLFWInrule.png\" alt=\"\" width=\"875\" height=\"1174\" \/><\/a><\/p>\n<p>And people wonder why I would NEVER go back into Networking! Still doesn't work - everything that Windows does and always did is always SO unnecessarily complicated and time wasting.The summary so far is: You cannot easily get your WSL to act as a local network server except for localhost for MANY complex reasons - bridging (stops wsl access to internet so updates), firewall rules (WSL IP\/port settings get changed on reboot), local dchp server cannot set up an IP different to the Win PC mac address..etc...etc...<\/p>\n<p>Can't be fkin bothered with the bulshit..got better things to do - as historically usual for most things Windows ever did...but credit where it is due - Win11 is an absolutely amazing OS - unlike 8-10 shit<\/p>\n<p><code><\/code><code><\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_9680\" class=\"pvc_stats all  \" data-element-id=\"9680\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p>As I've done so much work on my websites and WordPress recently rebuilding\/fixing\/designing them for uploading to the web (here! lol) and I have about 256GB of space on my Win11 laptop, I wondered if all my Posts would work flawlessly on WSL, following my How-Tos line by line, and see if they worked as <a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/running-apache2-and-mysql-on-win11-wsl-ubuntu\/\" class=\"more-link\">...<span class=\"screen-reader-text\">\u00a0 Running Apache2, MYSQL and WordPress on Win11 WSL Ubuntu<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-9680","post","type-post","status-publish","format-standard","hentry","category-post"],"a3_pvc":{"activated":true,"total_views":57,"today_views":0},"_links":{"self":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts\/9680","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/comments?post=9680"}],"version-history":[{"count":131,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts\/9680\/revisions"}],"predecessor-version":[{"id":10361,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts\/9680\/revisions\/10361"}],"wp:attachment":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/media?parent=9680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/categories?post=9680"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/tags?post=9680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}