workbee_cnc_router

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revisionBoth sides next revision
workbee_cnc_router [09.08.2020 23:19] – [G-Code Sender] Pascal Suterworkbee_cnc_router [09.08.2020 23:32] Pascal Suter
Line 109: Line 109:
 i'm lazy, so i don't want to type that port 8000 all the time, let's add a redirect using ''lightthpd'':  i'm lazy, so i don't want to type that port 8000 all the time, let's add a redirect using ''lightthpd'': 
  
 +<code>
 +sudo apt install lighttpd
 +cd /etc/lighttpd
 +sudo nano conf-available/10-redirect.conf
 +</code>
 +put this in there: 
 +<code>
 +$HTTP["scheme"] == "http" {
 +    # capture vhost name with regex conditiona -> %0 in redirect pattern
 +    # must be the most inner block to the redirect rule
 +    $HTTP["host"] =~ ".*" {
 +        url.redirect = (".*" => "http://%0:8000$0")
 +    }
 +}
 +</code>
 +activate the config and restart the service
 +  cd conf-enabled
 +  sudo ln -s ../conf-available/10-redirect.conf
 +  sudo systemctl restart lighttpd.service
 +now you should be able to simply access the cncjs gui by entering the hostname of your raspberry in your browser
  
  • workbee_cnc_router.txt
  • Last modified: 23.12.2021 21:14
  • by Pascal Suter