GuLinux / AstroPhoto-Plus

A lightweight, web based astrophotography sequence generator and INDI client written in Python and React.
https://astrophotoplus.gulinux.net
GNU General Public License v3.0
53 stars 8 forks source link

lighttpd instead of nginx? #253

Closed aruangra closed 3 years ago

aruangra commented 3 years ago

Is it possible to run Astrophoto plus with lighttpd instead of nginx? Thanks.

gstrauss commented 3 years ago

After looking at config/dev-webserver-conf/nginx/astrophotoplus.conf, a lighttpd equivalent might be as simple as this (untested):

server.port = 3080
server.name = localhost
server.max-request-size = 204800
server.max-write-idle = 65535
server.stream-response-body = 2
server.modules += ("mod_setenv", "mod_proxy")
setenv.set-response-header = (
  "Cache-Control" => "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0"
)
proxy.server = (
  ""     => ( ( "host" => "127.0.0.1", "port" => "3000" ) )
  "/api" => ( ( "host" => "127.0.0.1", "port" => "5000" ) )
)

However, proxy.header might need to be added if URL-mapping is needed between the request and the backend.

GuLinux commented 3 years ago

Hi, closing as this is not really relevant to AstroPhoto Plus. Any HTTP server would work, providing it's properly configured, including lighttpd. The configuration provided from @gstrauss looks correct to me. Thanks