0

I would like to run an Angular 8 app on lighttpd webserver installed on a Raspberry Pi. Unfortunately the app stops loading immediately leaving a blank browser screen. No error in browser console, no error in lighttpd logs, no hint. Just nothing. What exactly am I missing here? Maybe there's no way to get an Angular app running in lighttpd? Anyone got this to work?

This is my lighttpd config file:

server.modules = (
    "mod_access",
    "mod_alias",
    "mod_compress",
    "mod_redirect",
    "mod_rewrite"
)

server.document-root        = "/var/www/html"
server.upload-dirs          = ( "/var/cache/lighttpd/uploads" )
server.errorlog             = "/var/log/lighttpd/error.log"
server.pid-file             = "/var/run/lighttpd.pid"
server.username             = "www-data"
server.groupname            = "www-data"
server.port                 = 80


index-file.names            = ( "index.php", "index.html", "index.lighttpd.html" )
url.access-deny             = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

compress.cache-dir          = "/var/cache/lighttpd/compress/"
compress.filetype           = ( "application/javascript", "text/css", "text/html", "text/plain" )

# default listening port for IPv6 falls back to the IPv4 port
include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
11
  • The angular application has been installed on the RPi? Where? Mar 6, 2020 at 17:25
  • Into the lighttpd default directory /var/www/html. See server.document-root in the config above.
    – mwalter
    Mar 8, 2020 at 20:07
  • And this application contains only static files, or do you have a server process (node.js perhaps) running on the RPi? Mar 8, 2020 at 21:45
  • Yes HTML and JS files only. Well some PNG, SVG, TTF and WOFF files as well. There are no additional server processes running besides sftp-server.
    – mwalter
    Mar 9, 2020 at 7:38
  • Activate the access log too. Make sure lighttpd can write to the error log. Add 'debug.log-file-not-found = "enable"' to your configuration, perhaps debug.log-request-handling also. Inspect the requests sent by your browser, do they reach your server? Mar 9, 2020 at 11:49

1 Answer 1

0

Well it was an application issue. After removing all keycloak auth dependencies it worked. Not sure there was some misconfiguration regarding authentication but I intend to switch to angular-oauth2-oidc library anyway.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .