Advertisement
Guest User

Untitled

a guest
Mar 11th, 2021
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.60 KB | None | 0 0
  1. pi@piaware:~ $ cat /etc/lighttpd/conf-enabled/89-*
  2. # Allows access to the static files that provide the dump1090 map view,
  3. # and also to the dynamically-generated json parts that contain aircraft
  4. # data and are periodically written by the dump1090 daemon.
  5.  
  6. # Enable alias module
  7. #
  8. ## This module is normally already enabled in lighttpd, so you should not
  9. ## need to uncommment this line.
  10. ## There are some cases (e.g. when installing this on a Raspberry Pi
  11. ## that runs PiHole) in which the module has been removed from the
  12. ## default configuration, and the dump1090-fa web interface no longer
  13. ## loads properly.
  14. ## If this is what you are experiencing, or if you see messages in your
  15. ## error log like:
  16. ## (server.c.1493) WARNING: unknown config-key: alias.url (ignored)
  17. ## then uncommenting this line and then restarting lighttpd could fix
  18. ## the issue.
  19. ## This is not enabled by default as standard lighttpd will not start if
  20. ## modules are loaded multiple times.
  21. #
  22. # server.modules += ( "mod_alias" )
  23.  
  24. alias.url += (
  25. "/dump1090-fa/data/" => "/run/dump1090-fa/",
  26. "/dump1090-fa/" => "/usr/share/dump1090-fa/html/"
  27. )
  28.  
  29. # redirect the slash-less URL
  30. url.redirect += (
  31. "^/dump1090-fa$" => "/dump1090-fa/"
  32. )
  33.  
  34. # Listen on port 8080 and serve the map there, too.
  35. $SERVER["socket"] == ":8080" {
  36. alias.url += (
  37. "/data/" => "/run/dump1090-fa/",
  38. "/" => "/usr/share/dump1090-fa/html/"
  39. )
  40. }
  41.  
  42. # Add CORS header
  43. #server.modules += ( "mod_setenv" )
  44. $HTTP["url"] =~ "^/dump1090-fa/data/.*\.json$" {
  45. setenv.set-response-header = ( "Access-Control-Allow-Origin" => "*" )
  46. }
  47.  
  48. # Uncomment this section to enable SSL traffic (HTTPS) - especially useful
  49. # for .dev domains
  50. ## Listen on 8443 for SSL connections
  51. #server.modules += ( "mod_openssl" )
  52. #$HTTP["host"] == "piaware.example.com" {
  53. # $SERVER["socket"] == ":8443" {
  54. # ssl.engine = "enable"
  55. # ssl.pemfile = "/etc/ssl/certs/combined.pem"
  56. # ssl.ca-file = "/etc/ssl/certs/fullchain.cer"
  57. # ssl.honor-cipher-order = "enable"
  58. # ssl.cipher-list = "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"
  59. # ssl.use-sslv2 = "disable"
  60. # ssl.use-sslv3 = "disable"
  61. #
  62. # alias.url += (
  63. # "/data/" => "/run/dump1090-fa/",
  64. # "/" => "/usr/share/dump1090-fa/html/"
  65. # )
  66. # }
  67. #}
  68. #
  69. ## Redirect HTTP to HTTPS
  70. #$HTTP["scheme"] == "http" {
  71. # $HTTP["host"] =~ ".*" {
  72. # url.redirect = (".*" => "https://%0$0")
  73. # }
  74. #}
  75.  
  76. # Allows access to the static files that provide the skyaware978 map view,
  77. # and also to the dynamically-generated json parts that contain aircraft
  78. # data and are periodically written by the skyaware978 daemon.
  79.  
  80. alias.url += (
  81. "/skyaware978/data/" => "/run/skyaware978/",
  82. "/skyaware978/" => "/usr/share/skyaware978/html/"
  83. )
  84.  
  85. # redirect the slash-less URL
  86. url.redirect += (
  87. "^/skyaware978$" => "/skyaware978/"
  88. )
  89.  
  90. # Listen on port 8978 and serve the map there, too.
  91. $SERVER["socket"] == ":8978" {
  92. alias.url += (
  93. "/data/" => "/run/skyaware978/",
  94. "/" => "/usr/share/skyaware978/html/"
  95. )
  96. }
  97.  
  98. # Add CORS header
  99. #server.modules += ( "mod_setenv" )
  100. $HTTP["url"] =~ "^/skyaware978/data/.*\.json$" {
  101. setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
  102. }
  103. # Allows access to the static files that provide the dump1090 map view,
  104. # and also to the dynamically-generated json parts that contain aircraft
  105. # data and are periodically written by the dump1090 daemon.
  106.  
  107. # Enable alias module
  108. #
  109. ## This module is normally already enabled in lighttpd, so you should not
  110. ## need to uncommment this line.
  111. ## There are some cases (e.g. when installing this on a Raspberry Pi
  112. ## that runs PiHole) in which the module has been removed from the
  113. ## default configuration, and the dump1090-fa web interface no longer
  114. ## loads properly.
  115. ## If this is what you are experiencing, or if you see messages in your
  116. ## error log like:
  117. ## (server.c.1493) WARNING: unknown config-key: alias.url (ignored)
  118. ## then uncommenting this line and then restarting lighttpd could fix
  119. ## the issue.
  120. ## This is not enabled by default as standard lighttpd will not start if
  121. ## modules are loaded multiple times.
  122. #
  123. # server.modules += ( "mod_alias" )
  124.  
  125. alias.url += (
  126. "/skyaware/data/" => "/run/dump1090-fa/",
  127. "/skyaware/data-978/" => "/run/skyaware978/",
  128. "/skyaware/" => "/usr/share/skyaware/html/"
  129. )
  130.  
  131. # redirect the slash-less URL
  132. url.redirect += (
  133. "^/skyaware$" => "/skyaware/"
  134. )
  135.  
  136. # Listen on port 8080 and serve the map there, too.
  137. $SERVER["socket"] == ":8080" {
  138. alias.url += (
  139. "/data/" => "/run/dump1090-fa/",
  140. "/data-978/" => "/run/skyaware978/",
  141. "/" => "/usr/share/skyaware/html/"
  142. )
  143. }
  144.  
  145. # Add CORS header
  146. #server.modules += ( "mod_setenv" )
  147. $HTTP["url"] =~ "^/skyaware/data/.*\.json$" {
  148. setenv.set-response-header = ( "Access-Control-Allow-Origin" => "*" )
  149. }
  150.  
  151. # Uncomment this section to enable SSL traffic (HTTPS) - especially useful
  152. # for .dev domains
  153. ## Listen on 8443 for SSL connections
  154. #server.modules += ( "mod_openssl" )
  155. #$HTTP["host"] == "piaware.example.com" {
  156. # $SERVER["socket"] == ":8443" {
  157. # ssl.engine = "enable"
  158. # ssl.pemfile = "/etc/ssl/certs/combined.pem"
  159. # ssl.ca-file = "/etc/ssl/certs/fullchain.cer"
  160. # ssl.honor-cipher-order = "enable"
  161. # ssl.cipher-list = "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"
  162. # ssl.use-sslv2 = "disable"
  163. # ssl.use-sslv3 = "disable"
  164. #
  165. # alias.url += (
  166. # "/data/" => "/run/dump1090-fa/",
  167. # "/" => "/usr/share/dump1090-fa/html/"
  168. # )
  169. # }
  170. #}
  171. #
  172. ## Redirect HTTP to HTTPS
  173. #$HTTP["scheme"] == "http" {
  174. # $HTTP["host"] =~ ".*" {
  175. # url.redirect = (".*" => "https://%0$0")
  176. # }
  177. #}
  178. pi@piaware:~ $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement