react-native-static-server icon indicating copy to clipboard operation
react-native-static-server copied to clipboard

Server exited with error, when i set "mod_expire" on extraConfig

Open hanwong opened this issue 1 year ago • 1 comments

I got this error and server was crashed, when i modifed extraConfig like below from example codes.

extraConfig: server.modules += ("mod_expire") expire.url = ("/" => "access plus 1 seconds"),

IMG_E4EE980D013F-1

hanwong avatar Jul 26 '24 03:07 hanwong

Well, I guess, mod_expire should be included into the build here — https://github.com/birdofpreyru/react-native-static-server/blob/6da88a8e997a23294c2a7587a6dd62b767be25c5/CMakeLists.txt#L122-L130, without it it is not initialized.

Also you may look into errorLog option, to get your hand on the underlying server logs with the exact reason of the crash.

birdofpreyru avatar Jul 26 '24 07:07 birdofpreyru

There is a list of modules that upstream lighttpd builds into the lighttpd server by default since they are small enough that building as separate shared objects takes up more space.

https://git.lighttpd.net/lighttpd/lighttpd1.4/src/branch/master/src/CMakeLists.txt#L846

For this ticket, please consider adding at least mod_expire, mod_redirect, and mod_access, and perhaps even mod_fastcgi and mod_scgi. None have external dependencies besides suggesting PCRE2 for mod_redirect, which is also a recommended dependency of mod_rewrite and mod_dirlisting, which you already include.

gstrauss avatar Jan 18 '25 08:01 gstrauss