From plug-discuss-bounces@lists.phxlinux.org Mon Dec 30 22:42:04 2019 Return-Path: X-Original-To: lurker@lists.phxlinux.org Delivered-To: lurker@lists.phxlinux.org Received: from phxlinux.org (localhost [127.0.0.1]) by phxlinux.org (Postfix) with ESMTP id 7453732A0007; Mon, 30 Dec 2019 22:42:03 -0700 (MST) X-Original-To: plug-discuss@lists.phxlinux.org Delivered-To: plug-discuss@lists.phxlinux.org Received: from mail-ot1-f41.google.com (mail-ot1-f41.google.com [209.85.210.41]) by phxlinux.org (Postfix) with ESMTPS id 068FC32A0002 for ; Mon, 30 Dec 2019 22:42:00 -0700 (MST) Received: by mail-ot1-f41.google.com with SMTP id w21so41283453otj.7 for ; Mon, 30 Dec 2019 21:42:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=8Dd7mcztAj7YGmON4YksHP3g9OydVqA0Q4vacbM6P9M=; b=iD3TlgMmiRtAC8YLAbK+hky2HoF5yZ+M2yscJPUmeStVZn6xy10t8gHbRRZxay8slK xV5eUqFTbdepTgDt5F6OT0EW2pehWXOJhyN6W5d63FVm+WiYJ20ZpT/YeIzhepyg47Qc xIuk4l33pw9UV+DgMzNmeGG6SKnMH0T8yA5b8HN1jSrpZiaghZ2k/qjm1GY0Lj5/btI9 yEb/NG/6wl1y5weUdt+ZJ75i646SvXekhlvV4N4VT3uy5b4ZWlxEeEeyNEQU7UAR9ZGq /l9ALe8gqm8od6FihcOJl0e/4KFsJ/utBI0G+5jIEfxc4WJBjdpgtigNENu5ErkJoQyn PTaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=8Dd7mcztAj7YGmON4YksHP3g9OydVqA0Q4vacbM6P9M=; b=nqH7GHrmkKJzKFyTiILqCwGVvBBAbxuxJxieSsNN52j7X4zN4hiwbeBOQKp2KDTDV5 jGzf8CIkc6UD5Pihg5RYrTKxVmWRqZXOVH+BZvlGHaz77iQpionwBm7ORzA1FDbK10kp qSK8dBhXBRUNVOn6EyxVxciYsjPCfTzRBJhEK1vDkuqYRha5d969RvsEJ9c0nHObNq3p EDfSKpBOf4O02FA2J9C+64eH/Bfii4e+ZjRcVwnqzeadtkqSbdE/8HaavXik94OTU45e eS7GSBXhRK1gWnzYns9Q0fKDrZk3AIXg5KenkzbblIZ+MORk0AdM1D/5detbgKH05VVL IamQ== X-Gm-Message-State: APjAAAU+iDqm7Nu8bFgUNZtRbgEQrzEiv+Z+5VQETP0ma5w1gXnx+0sy RXgpmGPKd1Nk0IOiMgcn7tpTeuAu5EH+x7B+clAOGoZptBU= X-Google-Smtp-Source: APXvYqwgcEzVFkETfgvLjDhHsAdZYmh85Lut7wh2ONTnJOLSfj4AIiTlDFUH89cHKwVxpkoxWMvmuryUFQTzxKWo+BY= X-Received: by 2002:a05:6830:184:: with SMTP id q4mr61412387ota.232.1577770919984; Mon, 30 Dec 2019 21:41:59 -0800 (PST) MIME-Version: 1.0 References: <87808fed8d3652eb11bc1622cdb23fca@phpcoderusa.com> In-Reply-To: From: James Dugger Date: Mon, 30 Dec 2019 19:41:48 -1000 Message-ID: Subject: Re: Windows Subsystem for Linux && Visual Studio Code To: Main PLUG discussion list X-BeenThere: plug-discuss@lists.phxlinux.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Main PLUG discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Main PLUG discussion list Content-Type: multipart/mixed; boundary="===============2128116399281963863==" Errors-To: plug-discuss-bounces@lists.phxlinux.org Sender: "PLUG-discuss" --===============2128116399281963863== Content-Type: multipart/alternative; boundary="0000000000003906db059af96b2d" --0000000000003906db059af96b2d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Have you tried going to the site using chrome incognito? This will not use cached settings in chrome. If that works should just be clearing cache. You can flush windows dns cache settings like this: go to command shell in Windows and try ipconfig /release ipconfig /all ipconfig /flushdns ipconfig /renew netsh int ip set dns netsh winsock reset restart Windows On Mon, Dec 30, 2019 at 5:12 PM Stephen Partington wrote: > Chrome has its own DNS. That is meant to supplement the systems DNS. > > On Mon, Dec 30, 2019, 8:05 PM wrote: > >> >> Ok, >> >> I failed to edit the Windows hosts file. I edited the Linux hosts file. >> So I finally realized I needed to edit the Windows hosts file.... that >> is done. >> >> Still unable to pull up the site. Then I recalled the issue I had >> sometime ago.... Chrome does not like this configuration for some reason= . >> >> I am able to view the site in FireFox but not in Chrome. >> >> Not sure why... would like to understand why there is this problem. >> >> Anyone have any thoughts? >> >> I am running Win 10 Pro with the Windows Subsystem for Linux. I'm >> running Ubuntu 16.04LTS with a LAMP configuration. >> >> I've set the Windows Hosts file to 127.0.0.1 for each of the vhost on th= e >> WSL. >> >> I can enter the IP in Chrome and see the site, however when I enter >> something like MyFramework.dev in the browser URL I get >> This site can=E2=80=99t be reached >> >> However I can visit the dev site just fine in FireFox. >> >> Any thoughts? >> >> Thanks!! >> >> >> >> >> >> On 2019-12-30 16:46, James Dugger wrote: >> >> What type of site. If WordPress You may need to set AllowOveride >> directive in the section >> >> On Mon, Dec 30, 2019, 1:43 PM James Dugger >> wrote: >> >>> What does Apache error_log and access_log say >>> >>> On Mon, Dec 30, 2019, 1:37 PM wrote: >>> >>>> >>>> chown -R www-data:www-data did not fix the problem. >>>> >>>> >>>> >>>> On 2019-12-30 15:50, James Dugger wrote: >>>> >>>> Try setting chown -R www-data:www-data on the document root >>>> >>>> On Mon, Dec 30, 2019, 12:48 PM Stephen Partington >>>> wrote: >>>> >>>>> This might help. >>>>> >>>>> https://docs.microsoft.com/en-us/windows/wsl/wsl2-install >>>>> >>>>> On Mon, Dec 30, 2019, 3:41 PM wrote: >>>>> >>>>>> >>>>>> I've been trying to locate a command that will tell me which version >>>>>> of the WSL I am running. The best answer I read was the WSL is tied= to the >>>>>> Windows updates.... which I get regularly. >>>>>> >>>>>> I have a vhost in /etc/apache2/sites-available/myframework.dev.conf >>>>>> with the following excerpt >>>>>> >>>>>> ... >>>>>> >>>>>> DocumentRoot /var/www/html/myframework.dev/public_html >>>>>> ServerName www.myframework.dev >>>>>> >>>>>> ... >>>>>> >>>>>> I enabled myframework.dev.conf and restarted apache... >>>>>> >>>>>> I edited /etc/hosts and added the following 2 lines : >>>>>> >>>>>> 127.0.0.1 www.myframework.dev >>>>>> >>>>>> 127.0.0.1 myframework.dev >>>>>> >>>>>> When I enter the url www.myframework.dev into my browser, I get a >>>>>> message: >>>>>> This site can't be reached >>>>>> >>>>>> >>>>>> I set the file permissions : chmod 755 -R html/ and ownership : chow= n >>>>>> -R myuser:myuser html >>>>>> >>>>>> I'm sure it much be something simple.... >>>>>> >>>>>> Note : If I go to localhost in the browser I see a page located >>>>>> at /var/www/html/index.php >>>>>> >>>>>> Any help is much appreciated. >>>>>> >>>>>> Keith >>>>>> >>>>>> >>>>>> On 2019-12-19 02:07, James Dugger wrote: >>>>>> >>>>>> Are you on the latest version of Windows 10 with WSL2? If not there >>>>>> are huge differences. Prior to WSL2 and the latest Windows 10 devel= oper >>>>>> mode, the WSL sent linux system calls to an emulator that the Window= s NT >>>>>> kernel could understand. However with the advent of the latest Wind= ows 10 >>>>>> updates and WSL2 (June 2019) Microsoft installs a full linux kernel = with >>>>>> the WSL2 distribution you chose. I think the latest for Ubuntu now = is >>>>>> 18.04 on the Microsoft Store. When launched for projects saved and = running >>>>>> in the WSL Visual Studio Code now knows the project is a Linux proje= ct open >>>>>> with the Linux binaries enabled. You can see this when the bottom l= eft >>>>>> screen lights up in the highlighted text color and indicates WSL. >>>>>> >>>>>> I have not noticed a lag in VS Code in on either Windows or Linux >>>>>> based projects (lasts versions) . But my system is a core i7. Haven= 't had >>>>>> to reboot either. >>>>>> I am running the latest Windows 10 Version. with Hyper V shut down >>>>>> and VirtualBox installed as a Hypervisor. I don't use the native WS= L as a >>>>>> native webserver for PHP applications. I use Vagrant and VirtualBox= for >>>>>> building guest machines to run/develop those apps. >>>>>> >>>>>> Regarding Apache I assume you are setting up separate document root >>>>>> directories for each site declared in different virtual hosts files = or >>>>>> section of code in the main apache conf file or separate conf files= . >>>>>> >>>>>> Do you have corresponding settings in the /etc/hosts file that are >>>>>> correctly resolving to your virtual host entries? >>>>>> >>>>>> On Mon, Dec 16, 2019 at 5:03 PM wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> AZ Pete mentioned the Windows Powershell and the Visual Studio Code >>>>>>> editor. I thought I would branch off of that. >>>>>>> >>>>>>> I'm not a Python developer. I'm a PHP developer. >>>>>>> >>>>>>> In the past I have always used an external LAMP server for >>>>>>> development. Currently I have an old i3 laptop that was upgraded t= o an >>>>>>> SSD. Does the job just fine. >>>>>>> >>>>>>> A month or so ago I thought I would experiment with the Windows >>>>>>> Subsystem for Linux by installing Apache, MySql, and PHP. Worked w= ell, >>>>>>> with two exceptions. >>>>>>> >>>>>>> I used Visual Studio Code to edit the code "remotely". >>>>>>> >>>>>>> I had two issues which I do not recall completely. 1) When I would >>>>>>> bring the computer out of screen saver mode it would run really slo= w and >>>>>>> require a reboot. I'm guessing the subsystem went to sleep and wa= s not >>>>>>> able to wake up..... 2) As I recall I configured a number of vhosts >>>>>>> off of /var/www/html/ which worked well except PHP reported the Doc= root was >>>>>>> the same as the localhost for all three vhosts, even though they >>>>>>> were configured with different Docroots. I wonder if there might be= a >>>>>>> Apache setting that will correct this? >>>>>>> >>>>>>> The subsystem reports its running Ubuntu 16.04.6 LTS. >>>>>>> >>>>>>> I think it might be time to dig a little deeper. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> --------------------------------------------------- >>>>>>> PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org >>>>>>> To subscribe, unsubscribe, or to change your mail settings: >>>>>>> https://lists.phxlinux.org/mailman/listinfo/plug-discuss >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> James >>>>>> >>>>>> *Linkedin * >>>>>> >>>>>> --------------------------------------------------- >>>>>> PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org >>>>>> To subscribe, unsubscribe, or to change your mail settings: >>>>>> https://lists.phxlinux.org/mailman/listinfo/plug-discuss >>>>>> >>>>>> --------------------------------------------------- >>>>>> PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org >>>>>> To subscribe, unsubscribe, or to change your mail settings: >>>>>> https://lists.phxlinux.org/mailman/listinfo/plug-discuss >>>>> >>>>> --------------------------------------------------- >>>>> PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org >>>>> To subscribe, unsubscribe, or to change your mail settings: >>>>> https://lists.phxlinux.org/mailman/listinfo/plug-discuss >>>> >>>> >>>> --------------------------------------------------- >>>> PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org >>>> To subscribe, unsubscribe, or to change your mail settings: >>>> https://lists.phxlinux.org/mailman/listinfo/plug-discuss >>>> >>>> --------------------------------------------------- >> PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org >> To subscribe, unsubscribe, or to change your mail settings: >> https://lists.phxlinux.org/mailman/listinfo/plug-discuss > > --------------------------------------------------- > PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org > To subscribe, unsubscribe, or to change your mail settings: > https://lists.phxlinux.org/mailman/listinfo/plug-discuss --=20 James *Linkedin * --0000000000003906db059af96b2d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Have you tried going=C2= =A0to the site using chrome incognito?=C2=A0 This will not use cached setti= ngs in chrome.=C2=A0 If that works should just be clearing cache.

Yo= u can flush windows dns cache settings like this:
go to command shell in Windows and try

ipconfig /release
ipconfig /all
= ipconfig /flushdns
ipconfig /renew
netsh int ip set dns=
netsh winsock reset

restart Windows

On Mon, Dec 30, 2019 at 5:12 PM Stephen Partington <cryptworks@gmail.com> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">
Chrome h= as its own DNS. That is meant to supplement the systems DNS.=C2=A0
On Mon, D= ec 30, 2019, 8:05 PM <techlists@phpcoderusa.com> wrote:


Ok,=C2=A0

I failed to edit the Windows hosts file.=C2=A0 I edited the Linux hosts = file.=C2=A0 So I finally realized I needed to edit the=C2=A0Windows h= osts file.... that is done.=C2=A0=C2=A0

Still unable to pull up the site.=C2=A0 Then I recalled the issue = I had sometime ago.... Chrome does not like this configuration for some rea= son.=C2=A0

I am able to view the site in FireFox but not in Chrome.

Not sure why... would= =C2=A0like to understand why there is this problem.

Anyone have any thoughts?

I am running Win 10 Pro with the Windows Subsystem for Linux.=C2= =A0 I'm running Ubuntu 16.04LTS with a LAMP configuration.

I've set the Windows Hosts file to 127.0.0.1 for each of the v= host on the WSL.

I can enter the IP in Chrome and see the site, however when I ente= r something like MyFramework.dev in the browser URL I get=C2=A0

This site can=E2=80=99t be reached

However I can visit the dev site just fine in FireFox.

Any thoughts?

Thanks!!


=C2=A0


On 2019-12-30 16:46, James Dugger wrote:

What type of site.=C2=A0 If WordPress You may need to set= AllowOveride directive in the <directory> section

On Mon, Dec 30, 2019, 1:43 PM James D= ugger <james.dugger@gmail.com> wrote:
What does Apache error_log and access_log say

On Mon, Dec 30, 2019, 1:37 PM <techlists@phpcoderusa.com> wrote:


chown -R www-data:www-data did not fix the problem.=C2=A0= =C2=A0

=C2=A0


On 2019-12-30 15:50, James Dugger wrote:

Try setting chown -R www-data:www-data on the document ro= ot

On Mon, Dec 30, 2019, 12:48 PM Stephe= n Partington <cryptworks@gmail.com> wrote:

On Mon, Dec 30, 2019, 3:41 PM <techlists@phpcoderusa.com> wrote:


I've been trying to locate a command that will tell me which version= of the WSL I am running.=C2=A0 The best answer I read was the WSL is tied = to the Windows updates.... which I get regularly.=C2=A0=C2=A0

I have a vhost in=C2=A0/etc/apache2/sites-available/myframework.dev.conf= with the following excerpt

...

DocumentRoot /var/www/html/myframework.dev/= public_html
ServerName www.myframework.dev<= /p>

...

I enabled=C2=A0myframework.dev.conf and restarted apache...=

I edited /etc/hosts and added the following 2 lines :=C2=A0=

127.0.0.1=C2=A0 =C2=A0 =C2=A0 =C2=A0www.myframework= .dev

127.0.0.1=C2=A0 =C2=A0 =C2=A0 =C2=A0my= framework.dev

When=C2=A0I enter the url=C2=A0www.myframework.dev<= /a>=C2=A0into my browser, I get a message:

This site can't be reached

=C2=A0

I set the file permissions : chmod 755 -R html/ and ownership=C2=A0: cho= wn -R myuser:myuser=C2=A0html=C2=A0

I'm sure it much be something simple....=C2=A0=C2=A0

Note : If I go to localhost in the browser I see a page located at=C2=A0= /var/www/html/index.php

Any help is much appreciated.

Keith


On 2019-12-19 02:07, James Dugger wrote:

Are you on the latest version of Wi= ndows 10 with WSL2? If not there are huge differences.=C2=A0 Prior to WSL2 = and the latest Windows 10 developer mode, the WSL sent linux system calls t= o an emulator that the Windows NT kernel could understand.=C2=A0 However wi= th the advent of the latest Windows 10 updates and WSL2 (June 2019) Microso= ft installs a full linux kernel with the WSL2 distribution=C2=A0you chose.= =C2=A0 I think the latest for Ubuntu now is 18.04 on the Microsoft Store.= =C2=A0 When launched for projects saved and running in the WSL Visual Studi= o Code now knows the project=C2=A0is a Linux project open with the Linux bi= naries enabled.=C2=A0 You can see this when the bottom left screen lights u= p in the highlighted text color and indicates WSL.
=C2=A0
I have not noticed a lag in VS Code= in on either Windows or Linux based projects (lasts versions) . But my sys= tem is a core i7.=C2=A0 Haven't had to reboot either.=C2=A0
I am ru= nning the latest Windows 10 Version.=C2=A0 with Hyper V shut down and Virtu= alBox installed as a Hypervisor.=C2=A0 I don't use the native WSL as a = native webserver for PHP applications.=C2=A0 I use Vagrant and VirtualBox f= or building guest machines to run/develop those apps.

Regarding Apac= he I assume you are setting up separate document root directories for each = site declared in different virtual hosts files or section of code in the ma= in apache conf file=C2=A0 or separate conf files.

Do you have corresponding settings = in the /etc/hosts file that are correctly resolving to your virtual host en= tries?=C2=A0

Hi,=C2=A0

AZ Pete mentioned the Windows Powershell and the Visual Studio Code edit= or.=C2=A0 I thought I would branch off of that.

I'm not a=C2=A0Python developer. I'm a PHP developer.

In the past I have always used an external LAMP server for develop= ment.=C2=A0 Currently I have an old i3 laptop that was upgraded to an SSD.= =C2=A0 Does the job just fine.

A month or so ago I thought I would experiment=C2=A0with=C2=A0the Windows Subsystem for Lin= ux by installing Apache, MySql, and PHP.=C2=A0 Worked well, with=C2=A0two e= xceptions.=C2=A0=C2=A0

I used=C2=A0Visual Studio Code to edit the code "remotely&quo= t;.

I had two issues which I do not recall completely.=C2=A0 1) When I= would bring the computer=C2=A0out of screen saver mode it would run really= slow and require a reboot.=C2=A0 I'm guessing=C2=A0 the subsystem went= to sleep and was not able to=C2=A0wake up..... 2) As I recall I configured a number of vhosts off of /var/= www/html/ which worked well except PHP reported the Docroot was the same as= the localhost for all three vhosts, even though they were=C2=A0configured = with different Docroots. I wonder=C2=A0if there might be a Apache setting t= hat will correct this?

The subsystem=C2=A0reports=C2= =A0its=C2=A0running=C2=A0= Ubuntu 16.04.6 LTS.

I think it might be time to dig a li= ttle deeper.=C2=A0=C2=A0




---------------------------------------------------
PLUG-discuss mailin= g list - PLUG-discuss@lists.phxlinux.org
To subscribe,= unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug= -discuss

=C2=A0
--
James

---------------= ------------------------------------
PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org
To subscribe, unsubscribe, o= r to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss
---------------------------------------------------
PLUG-discuss mailin= g list - PLUG-discuss@lists.phxlinux.org
To subscribe,= unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug= -discuss
---------------------------------------------------
PLUG-discuss mailin= g list - PLUG-discuss@lists.phxlinux.org
To subscribe,= unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug= -discuss

---------------= ------------------------------------
PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org
To subscribe, unsubscribe, o= r to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss
---------------------------------------------------
PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailma= n/listinfo/plug-discuss
---------------------------------------------------
PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/= plug-discuss


--
=
--0000000000003906db059af96b2d-- --===============2128116399281963863== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tClBMVUct ZGlzY3VzcyBtYWlsaW5nIGxpc3QgLSBQTFVHLWRpc2N1c3NAbGlzdHMucGh4bGludXgub3JnClRv IHN1YnNjcmliZSwgdW5zdWJzY3JpYmUsIG9yIHRvIGNoYW5nZSB5b3VyIG1haWwgc2V0dGluZ3M6 Cmh0dHBzOi8vbGlzdHMucGh4bGludXgub3JnL21haWxtYW4vbGlzdGluZm8vcGx1Zy1kaXNjdXNz --===============2128116399281963863==--