pull/1/head
vasyahacker 2023-03-16 07:45:51 +04:00
parent b04262ae5d
commit d98bebbd50
2 changed files with 4 additions and 4 deletions

View File

@ -247,8 +247,8 @@ func main() {
// http.Redirect(w, r, "//club.hugeping.ru/blog/std.hugeping", http.StatusSeeOther)
// })
http.Handle("hugeping.ru/", http.FileServer(http.Dir("/home/pi/Devel/gemini/www")))
http.Handle("syscall.ru/", http.FileServer(http.Dir("/home/pi/Devel/gemini/www")))
// http.Handle("hugeping.ru/", http.FileServer(http.Dir("/home/pi/Devel/gemini/www")))
// http.Handle("syscall.ru/", http.FileServer(http.Dir("/home/pi/Devel/gemini/www")))
if err := http.ListenAndServe(*listen_opt, nil); err != nil {
ii.Error.Printf("Error running web server: %s", err)

View File

@ -915,10 +915,10 @@ func WebInit(www *WWW) {
tpl_path := "tpl"
if _, err := os.Stat(tpl_path); errors.Is(err, os.ErrNotExist) {
fmt.Println("./tpl dir not exist")
fmt.Println("./tpl not found, trying /usr/local/share/ii-go/tpl..")
tpl_path = "/usr/local/share/ii-go/tpl"
if _, err := os.Stat(tpl_path); errors.Is(err, os.ErrNotExist) {
fmt.Println(tpl_path, "dir not exist")
fmt.Println(tpl_path, "not found")
os.Exit(1)
}
}