Project

General

Profile

How to configure mod_wstunnel in lighttpd.conf file

Added by jigar karu almost 4 years ago

Hi All,

I have upgraded lighttpd from 1.4.35 to 1.4.46 version, as openssl 1.1.1 supported from 1.4.45 onward.
But after upgrading to 1.4.46, I am not able to login from the webui, the issue is mod_websocket is replaced by mod_wstunnel.

Can anyone help me how to configure mod_wstunnel in my lighttpd.conf file.

I have attached my lighttpd.conf.

Thanks.

lighttpd.conf ==============================================================================================================
server.modules = ("mod_fastcgi", "mod_setenv", "mod_proxy", "mod_wstunnel", "mod_openssl")
server.upload-dirs = ( "/usr/local/lmedia/lost+found", "/tmp" )

include "mod_websocket.conf"

server.document-root = "/usr/local/www"
server.pid-file = "/var/run/lighttpd.pid"

  1. files to check for if .../ is requested
    index-file.names = ( "home.html","index.php", "index.html",
    "index.htm", "default.htm", "index.html.gz","viewer.html")

server.error-handler-404 = "/index.html"

debug.log-request-handling = "disable"
debug.log-state-handling = "disable"
debug.log-request-header="enable"
debug.log-response-header="enable"

server.max-read-idle = 120
server.max-keep-alive-idle = 120
fastcgi.debug = 1

fastcgi.server += ("/api" =>
((
"bin-path" => "/usr/local/bin/spx_restservice",
"max-procs" => 1,
"socket" => "/tmp/spx_restservice.socket",
"check-local" => "disable",
"allow-x-send-file" => "enable"
)))

#include_shell "[ -f /conf/lighttpd_ext.conf ] && cat /conf/lighttpd_ext.conf || echo -n "
include "lighttpd_ext.conf"

#use always https feature based support
include "mod_always_https.conf"
  1. mimetype mapping
    mimetype.assign = (
    ".gif" => "image/gif",
    ".jpg" => "image/jpeg",
    ".jpeg" => "image/jpeg",
    ".png" => "image/png",
    ".css" => "text/css",
    ".html" => "text/html",
    ".htm" => "text/html",
    ".js" => "text/javascript",
    ".text" => "text/plain",
    ".txt" => "text/plain",
    ".xml" => "text/xml",
    ".elg" => "application/x-ibmclog",
    ".jnlp" => "application/x-java-jnlp-file",
    ".gz" => "application/x-gzip",
    ".tar.gz" => "application/x-gzip-compressed-tar"
    )

#enable ipv6 support
server.use-ipv6 = "enable"
server.socket = "[::]:80"

  1. bind to port (default: 80)
    server.port = 80
  1. SSL Engine
    $SERVER["socket"] == ":443" {
    ssl.engine = "enable"
    server.use-ipv6 = "enable"
    ssl.cipher-list = "TLSv1+HIGH RC4 eNULL !3DES @STRENGTH"
    }

$HTTP["url"] =~ "\.js$|\.html$|\.css$|\.png$|\.woff$|\.jpg$|^/$" {
setenv.add-response-header += ( "Content-Encoding" => "gzip","X-Frame-Options" => "SAMEORIGIN")
}
##set cache control to no only for url with /api/
$HTTP["url"] =~ "^/api" {
setenv.add-response-header += ( "Cache-Control" => "no-store, no-cache, must-revalidate, post-check=0, pre-check=0" )
}

include "redfish_lighttpd.conf"

==============================================================================================================