Unable to access tutor local launch via host browser

Here’s how I launched my new tutor deployment:

smhumayun@SMH-HP-Pavilion:/mnt/c/Users/smhum$ tutor local launch
==================================================
        Interactive platform configuration
==================================================
Your website domain name for students (LMS) [openedx.smhumayun.com]
Your website domain name for teachers (CMS) [studio.openedx.smhumayun.com]
Your platform name/title [SMH's Open edX]
Your public contact email address [smhumayun@gmail.com]
The default language code for the platform [en]
Activate SSL/TLS certificates for HTTPS access? Important note: this will NOT work in a development environment. [Y/n] n
Configuration saved to /home/smhumayun/.local/share/tutor/config.yml
Environment generated in /home/smhumayun/.local/share/tutor/env
======================================
        Building Docker images
======================================

When deployment is done, it says:

All services initialised.
The platform is now running and can be accessed at the following urls:

    http://openedx.smhumayun.com
    http://studio.openedx.smhumayun.com
    http://apps.openedx.smhumayun.com

I made following changes in my WSL2/Ubuntu “/etc/hosts” file:

# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateHosts = false
127.0.0.1       localhost
127.0.1.1       SMH-HP-Pavilion.        SMH-HP-Pavilion
127.0.0.1       openedx.smhumayun.com   SMH's Open edX

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

And, following changes in my WSL2/Ubuntu “/etc/wsl.conf” file:


[boot]
systemd=true

[network]
generateHosts = false

But, when I tried to access any of the 3 URLs mentioned above via my host’s browser, it shows following error:

This site can’t be reachedopenedx.smhumayun.com’s server IP address could not be found.
Try:

Checking the connection
Checking the proxy, firewall, and DNS configuration
Running Windows Network Diagnostics
ERR_NAME_NOT_RESOLVED

I also tried changing Caddy’s port to 81 but the error remains the same. However, when I tried accessing localhost:81, it returns HTTP 200 OK and I can see the Caddy logs spitting out relevant access logs as follows:

tutor_local-caddy-1          | {"level":"info","ts":1689236061.832045,"logger":"http.log.access","msg":"handled request","request":{"remote_ip":"172.18.0.1","remote_port":"34430","proto":"HTTP/1.1","method":"GET","host":"localhost:81","uri":"/favicon.ico","headers":{"Accept":["image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8"],"Sec-Fetch-Site":["same-origin"],"Sec-Fetch-Dest":["image"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"],"Sec-Ch-Ua-Platform":["\"Windows\""],"Accept-Language":["en-US,en;q=0.9"],"Sec-Ch-Ua-Mobile":["?0"],"Accept-Encoding":["gzip, deflate, br"],"Referer":["http://localhost:81/"],"Sec-Ch-Ua":["\"Not.A/Brand\";v=\"8\", \"Chromium\";v=\"114\", \"Google Chrome\";v=\"114\""],"Sec-Fetch-Mode":["no-cors"],"Connection":["keep-alive"]}},"user_id":"","duration":0.00001041,"size":0,"status":0,"resp_headers":{"Server":["Caddy"]}}

I tried http://localhost:81/cms, http://localhost:81/lms, http://localhost:81/admin and all other URL path combinations returned HTTP 200 OK with relevant Caddy’s access logs on the console but with a blank page on browser’s end.

Is there anything that I’m overlooking?

I have the same problem on my MacBook. Does anyone has already found a solution?
Thank’s in advance!

@AutoPostBack There may potentially be some differences in the overall config since you are on Mac and the original post is on Windows. Ideally you should open a new topic and clearly demonstrate what you have done/tried instead of simply saying you have the same problem.

That said, there’s a few things that stand out to me in the original post from @smhumayun which may potentially apply to you:

  1. Edits are being made to the hosts file in WSL2, but there is no mention of the hosts file being edited similarly in the host (Windows) operating system, this likely explains why the host cannot resolve the IP.
  2. The entries in the hosts file are missing the remaining subdomains, it should look something more like this:
    127.0.0.1 site.domain.tld apps.site.domain.tld studio.site.domain.tld
  3. caddy will not return your site if you browse to http://localhost:port
    you must use the domain name that you configured for your site.
  4. ideally you should have your hostnames and their respective IP defined on your DNS server as per the installation docs, you should have an “A” record for “site.domain.tld” pointing to your host’s IP and a “CNAME” record for apps/studio pointing back to your A record.
    using edits to your hosts file is really only beneficial in early testing as it then has to be edited on every computer that is planning on accessing the site, making for a very messy and fragmented setup.
  5. not related to the issue but just a side note, you should avoid using “openedx” or similar trademarks in your URL as per the Licensing Details