[Libwebsockets] How to set vhost url?
necktwi at icloud.com
Wed Jul 24 16:34:18 CEST 2019
I am porting my server from 2.x to 3.1. Previously I've implemented vhosts by parsing the request header and serve the respective file path with lws_plat_file_x functions. Now in 3.1 there are no lws_plat_file_x functions.
How to specify
host1.mydomain.com to server /var/www/host1
host2.mydomain.com to serve /var/www/host2?
vhost1_lws_http_mount .mountpoint = "host1.mydomain.com"
vhost1_lws_http_mount .origin = "/var/www/host1"
vhost2_lws_http_mount .mountpoint = "host2.mydomain.com"
vhost2_lws_http_mount .origin = "/var/www/host2"
does the trick?
More information about the Libwebsockets