etc-lwsws-conf.d-localhost-EXAMPLE 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. {
  2. "vhosts": [ {
  3. "name": "localhost",
  4. "port": "7681",
  5. "interface": "lo",
  6. # "host-ssl-key": "/etc/pki/tls/private/libwebsockets.org.key",
  7. # "host-ssl-cert": "/etc/pki/tls/certs/libwebsockets.org.crt",
  8. # "host-ssl-ca": "/etc/pki/tls/certs/libwebsockets.org.cer",
  9. "access-log": "/var/log/lwsws/test-access-log",
  10. # "sts": "on",
  11. "mounts": [{
  12. "mountpoint": "/",
  13. "origin": "file://_lws_ddir_/libwebsockets-test-server",
  14. "default": "test.html",
  15. "cache-max-age": "60",
  16. "cache-reuse": "1",
  17. "cache-revalidate": "1",
  18. "cache-intermediaries": "0"
  19. }, {
  20. "mountpoint": "/server-status",
  21. "origin": "file://_lws_ddir_/libwebsockets-test-server/server-status",
  22. "default": "server-status.html"
  23. }, {
  24. "mountpoint": "/testcgi",
  25. "origin": "cgi://_lws_ddir_/libwebsockets-test-server/lws-cgi-test.sh"
  26. }, {
  27. "mountpoint": "/formtest",
  28. "origin": "callback://protocol-post-demo"
  29. }],
  30. # which protocols are enabled for this vhost, and optional
  31. # vhost-specific config options for the protocol
  32. #
  33. "ws-protocols": [{
  34. "dumb-increment-protocol": {
  35. "status": "ok"
  36. },
  37. "lws-mirror-protocol": {
  38. "status": "ok"
  39. },
  40. "lws-status": {
  41. "status": "ok"
  42. },
  43. "protocol-post-demo": {
  44. "status": "ok"
  45. },
  46. "lws-server-status": {
  47. "status": "ok",
  48. "update-ms": "5000"
  49. }
  50. }]
  51. }
  52. ]
  53. }