gurucomputing / headscale-ui

A web frontend for the headscale Tailscale-compatible coordination server
BSD 3-Clause "New" or "Revised" License
1.71k stars 122 forks source link

Trying to deploy the "static site" but failing #124

Closed bmullan closed 10 months ago

bmullan commented 10 months ago

Ubuntu 22.04 & apache2

I am trying to deploy the static site per the README:

Headscale-UI is currently released as a static site: just take the release and host with your favorite web server. Headscale-UI expects to be served from the /web path to avoid overlap with headscale on the same domain.

So not configuring Apache much in the past I made some assumptions about what I might need to do. Note: I'm aware I could be doing this all wrong but...

I downloaded & unzipped: https://github.com/gurucomputing/headscale-ui/releases/download/2023.01.30-beta-1/headscale-ui.zip

Moved the resulting "web"" directory to /var/www:

sudo mv ./web /var/www/

Then...
Added site to Apache2 sites-available:

  1. Created a configuration file under /etc/apache2/sites-available.
  2. Activated the configuration file.
  3. Add original domain to hosts file.
  4. Restart the server.

pointed web browser using IP of the server

http://x.x.x.x

Never see the Headscale-UI

Any tips what I am missing or doing wrong?

thanks

routerino commented 10 months ago

While headscale can technically be ran as a static site, it is designed to be served via reverse proxy on the /web subpath of the primary headscale server. If all of that sounded like goobleteygook, you may be underestimating the complexity of running the UI.

Your immediate problem is that the UI won't load because you ran it as the root path, as opposed to the /web path of your web server. But that's going to be one of many problems you'll encounter trying to run it the way you are.

bmullan commented 10 months ago

@routerino

Don't know if you are interested but... I finally figured out what my problem was trying to deploy the "static site".

I'd done things correctly but just found out my ISP implemented CGNAT which failed certbot/letsencrypt and a couple other things.

So I switched my Domain/DNS provider from GoDaddy to Cloudflare. I learned that using Cloudflare's "Tunnel" feature I can bypass my ISP's CGNAT.