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

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