use standalone httpd service / move stratux services to port 8080

pull/266/head
bradanlane 2016-02-18 14:37:10 -05:00
rodzic 3a96f04394
commit 36393d859b
4 zmienionych plików z 11 dodań i 5 usunięć

Wyświetl plik

@ -37,8 +37,14 @@ setup_stratux() {
echo "**** STRATUX SETUP *****"
ssh_in_to_qemu chroot /mnt sh -l -ex - <<\EOF
#general
apt-get install -y screen
#http server
apt-get install -y lighttpd
ln -s /var/log /var/www/logs
makedir -p /var/logs/stratux
chmod o+x /var/logs/stratux
echo 'dir-listing.activate = "enable"' >> /etc/lighttpd/lighttpd.conf
echo 'server.follow-symlink = "enable"' >> /etc/lighttpd/lighttpd.conf
#wifi
apt-get install -y hostapd isc-dhcp-server
#troubleshooting

Wyświetl plik

@ -38,7 +38,7 @@ import (
const (
configLocation = "/etc/stratux.conf"
indexFilename = "/var/log/stratux/LOGINDEX"
managementAddr = ":80"
managementAddr = ":8080"
debugLog = "/var/log/stratux.log"
maxDatagramSize = 8192
maxUserMsgQueueSize = 25000 // About 10MB per port per connected client.

Wyświetl plik

@ -310,7 +310,7 @@ func managementInterface() {
weatherUpdate = NewUIBroadcaster()
trafficUpdate = NewUIBroadcaster()
http.HandleFunc("/", defaultServer)
// http.HandleFunc("/", defaultServer)
http.Handle("/logs/", http.StripPrefix("/logs/", http.FileServer(http.Dir("/var/log"))))
http.HandleFunc("/status",
func(w http.ResponseWriter, req *http.Request) {

Wyświetl plik

@ -1,5 +1,5 @@
// application constants
var URL_HOST_BASE = window.location.hostname;
var URL_HOST_BASE = window.location.hostname+":8080";
var URL_SETTINGS_GET = "http://" + URL_HOST_BASE + "/getSettings";
var URL_SETTINGS_SET = "http://" + URL_HOST_BASE + "/setSettings";
var URL_GPS_GET = "http://" + URL_HOST_BASE + "/getSituation";