Advertisement
Guest User

Untitled

a guest
Apr 28th, 2020
47
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ###################################################################################
  2. # Snippets
  3. ####################################################################################
  4. ####### Snippet 1 #######
  5. (mycommon) {
  6. ext .html .htm .php
  7. root "/root/" # Change path & syntax for your OS or your preferred location!
  8. gzip
  9. header / {
  10. X-Content-Type-Options nosniff
  11. X-XSS-Protection "1; mode=block"
  12. Strict-Transport-Security "max-age=31536000;"
  13. }
  14. }
  15. ####### Snippet 2 #######
  16. (mylocations) {
  17. # The code below will proxy PHP requests
  18. #fastcgi / 127.0.0.1:9000 php
  19. }
  20. ####################################################################################
  21. # web domain server block
  22. ####################################################################################
  23. apps.domain.net {
  24. tls user@domain.net # Email for Let's Encrypt Verification
  25. log "/logs/apps_access.log" {
  26. rotate_size 1 # Rotate after 1 MB
  27. rotate_age 7 # Keep log files for 7 days
  28. rotate_keep 2 # Keep at most 2 log files
  29. }
  30. errors "/logs/apps_error.log" {
  31. rotate_size 1 # Set max size 1 MB
  32. rotate_age 7 # Keep log files for 7 days
  33. rotate_keep 2 # Keep at most 2 log files
  34. }
  35. #on startup "C:\Users\user\Documents\caddy\php\php-cgi" -b 127.0.0.1:9000 -c "C:\Users\user\Documents\caddy\php\php.ini" &
  36. import mycommon # Import code snippet 1 defined above
  37. import mylocations # Import code snippet 2 defined above
  38. }
  39. ####################################################################################
  40. # localhost or Machine server block
  41. ####################################################################################
  42. http://localhost http://192.168.1.103 http://127.0.0.1 {
  43. log "/logs/local_access.log" {
  44. rotate_size 1 # Rotate after 1 MB
  45. rotate_age 7 # Keep log files for 7 days
  46. rotate_keep 2 # Keep at most 2 log files
  47. }
  48. errors "/logs/local_error.log" {
  49. rotate_size 1 # Set max size 1 MB
  50. rotate_age 7 # Keep log files for 7 days
  51. rotate_keep 2 # Keep at most 2 log files
  52. } import mycommon # Import code snippet 1 defined above
  53. import mylocations # Import code snippet 2 defined above
  54. }
  55. ####################################################################################
  56. # Airsonic Admin subdomain code block example
  57. ####################################################################################
  58. https://jukebox.domain.net/ http://local.airsonic/ {
  59. tls user@domain.net # Email for Let's Encrypt Verification
  60. gzip
  61. log "/logs/airsonic_access.log" {
  62. rotate_size 1 # Rotate after 1 MB
  63. rotate_age 7 # Keep log files for 7 days
  64. rotate_keep 2 # Keep at most 2 log files
  65. }
  66. errors "/logs/airsonic_error.log" {
  67. rotate_size 1 # Set max size 1 MB
  68. rotate_age 7 # Keep log files for 7 days
  69. rotate_keep 2 # Keep at most 2 log files
  70. }
  71. # proxy / 192.168.1.125:9632 { # https://github.com/airsonic/airsonic
  72. proxy / 192.168.1.103:4040 { # https://github.com/airsonic/airsonic
  73. transparent
  74. }
  75. }
  76. ####################################################################################
  77. # Calibre subdomain code block example
  78. ####################################################################################
  79. library1.domain.net http://local.calibre {
  80. tls user@domain.net # Email for Let's Encrypt Verification
  81. gzip
  82. log "/logs/calibre_access.log" {
  83. rotate_size 1 # Rotate after 1 MB
  84. rotate_age 7 # Keep log files for 7 days
  85. rotate_keep 2 # Keep at most 2 log files
  86. }
  87. errors "/logs/calibre_error.log" {
  88. rotate_size 1 # Set max size 1 MB
  89. rotate_age 7 # Keep log files for 7 days
  90. rotate_keep 2 # Keep at most 2 log files
  91. }
  92. proxy / 192.168.1.103:7070/ { #https://calibre-ebook.com/
  93. transparent
  94. }
  95. }
  96. ####################################################################################
  97. # Calibre-gui subdomain code block example
  98. ####################################################################################
  99. library-gui.domain.net http://local.calibre-gui {
  100. tls user@domain.net # Email for Let's Encrypt Verification
  101. gzip
  102. log "/logs/calibre-gui_access.log" {
  103. rotate_size 1 # Rotate after 1 MB
  104. rotate_age 7 # Keep log files for 7 days
  105. rotate_keep 2 # Keep at most 2 log files
  106. }
  107. errors "/logs/calibre-gui_error.log" {
  108. rotate_size 1 # Set max size 1 MB
  109. rotate_age 7 # Keep log files for 7 days
  110. rotate_keep 2 # Keep at most 2 log files
  111. }
  112. basicauth / username userpw
  113. proxy / 192.168.1.103:5800/ { # https://github.com/JiriS97/docker-calibre-gui
  114. transparent
  115. #websocket
  116. }
  117. }
  118. ####################################################################################
  119. # Calibre-web subdomain code block example
  120. ####################################################################################
  121. library2.domain.net http://local.calibre-web {
  122. tls user@domain.net # Email for Let's Encrypt Verification
  123. gzip
  124. log "/logs/calibre-web_access.log" {
  125. rotate_size 1 # Rotate after 1 MB
  126. rotate_age 7 # Keep log files for 7 days
  127. rotate_keep 2 # Keep at most 2 log files
  128. }
  129. errors "/logs/calibre-web_error.log" {
  130. rotate_size 1 # Set max size 1 MB
  131. rotate_age 7 # Keep log files for 7 days
  132. rotate_keep 2 # Keep at most 2 log files
  133. }
  134. proxy / 192.168.1.103:8083/ { #https://github.com/janeczku/calibre-web
  135. transparent
  136. }
  137. }
  138. ####################################################################################
  139. # Deluge Admin subdomain code block example
  140. ####################################################################################
  141. flood.domain.net http://local.deluge {
  142. tls user@domain.net # Email for Let's Encrypt Verification
  143. gzip
  144. log "/logs/deluge_access.log" {
  145. rotate_size 1 # Rotate after 1 MB
  146. rotate_age 7 # Keep log files for 7 days
  147. rotate_keep 2 # Keep at most 2 log files
  148. }
  149. errors "/logs/deluge_error.log" {
  150. rotate_size 1 # Set max size 1 MB
  151. rotate_age 7 # Keep log files for 7 days
  152. rotate_keep 2 # Keep at most 2 log files
  153. }
  154. rewrite {
  155. if_op or
  156. if {>Referer} has /deluge
  157. if {>Referer} has /192.168.1.103/themes/css/
  158. if {>Referer} has /192.168.1.103/css/
  159. to /deluge/{path}
  160. }
  161. proxy / http://192.168.1.103:8112 { # http://deluge-torrent.org/
  162. without /deluge
  163. transparent
  164. header_upstream X-Forwarded-Host {host}
  165. }
  166. }
  167. ####################################################################################
  168. # FireDaemon Fusion subdomain code block example
  169. ####################################################################################
  170. services.domain.net http://local.fusion {
  171. tls user@domain.net # Email for Let's Encrypt Verification
  172. gzip
  173. log "/logs/fusion_access.log" {
  174. rotate_size 1 # Rotate after 1 MB
  175. rotate_age 7 # Keep log files for 7 days
  176. rotate_keep 2 # Keep at most 2 log files
  177. }
  178. errors "/logs/fusion_error.log" {
  179. rotate_size 1 # Set max size 1 MB
  180. rotate_age 7 # Keep log files for 7 days
  181. rotate_keep 2 # Keep at most 2 log files
  182. }
  183. proxy / 192.168.1.103:20604 {
  184. transparent
  185. }
  186. }
  187. ####################################################################################
  188. # Grafana subdomain code block example
  189. ####################################################################################
  190. performance.domain.net http://local.performance {
  191. tls user@domain.net # Email for Let's Encrypt Verification
  192. gzip
  193. log "/logs/grafana_access.log" {
  194. rotate_size 1 # Rotate after 1 MB
  195. rotate_age 7 # Keep log files for 7 days
  196. rotate_keep 2 # Keep at most 2 log files
  197. }
  198. errors "/logs/grafana_error.log" {
  199. rotate_size 1 # Set max size 1 MB
  200. rotate_age 7 # Keep log files for 7 days
  201. rotate_keep 2 # Keep at most 2 log files
  202. }
  203. proxy / 192.168.1.103:3000 { # https://grafana.com/
  204. transparent
  205. }
  206. }
  207. ####################################################################################
  208. # InfluxDB subdomain code block example
  209. ####################################################################################
  210. metrics.domain.net {
  211. tls user@domain.net # Email for Let's Encrypt Verification
  212. gzip
  213. log "/logs/influxdb_access.log" {
  214. rotate_size 1 # Rotate after 1 MB
  215. rotate_age 7 # Keep log files for 7 days
  216. rotate_keep 2 # Keep at most 2 log files
  217. }
  218. errors "/logs/influxdb_error.log" {
  219. rotate_size 1 # Set max size 1 MB
  220. rotate_age 7 # Keep log files for 7 days
  221. rotate_keep 2 # Keep at most 2 log files
  222. }
  223. proxy / 192.168.1.103:8086 { # https://
  224. transparent
  225. }
  226. }
  227. ####################################################################################
  228. # Jackett subdomain code block example
  229. ####################################################################################
  230. tsearches.domain.net http://local.jackett {
  231. tls user@domain.net # Email for Let's Encrypt Verification
  232. gzip
  233. log "/logs/jackett_access.log" {
  234. rotate_size 1 # Rotate after 1 MB
  235. rotate_age 7 # Keep log files for 7 days
  236. rotate_keep 2 # Keep at most 2 log files
  237. }
  238. errors "/logs/jackett_error.log" {
  239. rotate_size 1 # Set max size 1 MB
  240. rotate_age 7 # Keep log files for 7 days
  241. rotate_keep 2 # Keep at most 2 log files
  242. }
  243. proxy / 192.168.1.103:9117 { # https://github.com/Jackett/Jackett
  244. transparent
  245. }
  246. }
  247. ####################################################################################
  248. # LazyLibrarian subdomain code block example
  249. ####################################################################################
  250. books.domain.net http://local.lazylibrarian {
  251. tls user@domain.net # Email for Let's Encrypt Verification
  252. gzip
  253. log "/logs/lazylibrarian_access.log" {
  254. rotate_size 1 # Rotate after 1 MB
  255. rotate_age 7 # Keep log files for 7 days
  256. rotate_keep 2 # Keep at most 2 log files
  257. }
  258. errors "/logs/lazylibrarian_error.log" {
  259. rotate_size 1 # Set max size 1 MB
  260. rotate_age 7 # Keep log files for 7 days
  261. rotate_keep 2 # Keep at most 2 log files
  262. }
  263. proxy / 192.168.1.103:5299/ { # https://github.com/DobyTang/LazyLibrarian
  264. header_upstream X-Forwarded-Host {host}
  265. transparent
  266. }
  267. }
  268. ####################################################################################
  269. # Lidarr subdomain code block example
  270. ####################################################################################
  271. music2.domain.net http://local.lidarr {
  272. tls user@domain.net # Email for Let's Encrypt Verification
  273. gzip
  274. log "/logs/lidarr_access.log" {
  275. rotate_size 1 # Rotate after 1 MB
  276. rotate_age 7 # Keep log files for 7 days
  277. rotate_keep 2 # Keep at most 2 log files
  278. }
  279. errors "/logs/lidarr_error.log" {
  280. rotate_size 1 # Set max size 1 MB
  281. rotate_age 7 # Keep log files for 7 days
  282. rotate_keep 2 # Keep at most 2 log files
  283. }
  284. proxy / 192.168.1.103:8686/ { # https://https://lidarr.audio/
  285. transparent
  286. }
  287. }
  288. ####################################################################################
  289. # Logarr subdomain code block example
  290. ####################################################################################
  291. logs.domain.net http://local.logarr {
  292. tls user@domain.net # Email for Let's Encrypt Verification
  293. gzip
  294. log "/logs/logarr_access.log" {
  295. rotate_size 1 # Rotate after 1 MB
  296. rotate_age 7 # Keep log files for 7 days
  297. rotate_keep 2 # Keep at most 2 log files
  298. }
  299. errors "/logs/logarr_error.log" {
  300. rotate_size 1 # Set max size 1 MB
  301. rotate_age 7 # Keep log files for 7 days
  302. rotate_keep 2 # Keep at most 2 log files
  303. }
  304. basicauth / username userpw
  305. proxy / 192.168.1.103:8081/logarr { # https://github.com/Monitorr/logarr
  306. without /logarr
  307. transparent
  308. }
  309. }
  310. ####################################################################################
  311. # Monitorr subdomain code block example
  312. ####################################################################################
  313. monitor.domain.net http://local.monitorr {
  314. tls user@domain.net # Email for Let's Encrypt Verification
  315. gzip
  316. log "/logs/monitorr_access.log" {
  317. rotate_size 1 # Rotate after 1 MB
  318. rotate_age 7 # Keep log files for 7 days
  319. rotate_keep 2 # Keep at most 2 log files
  320. }
  321. errors "/logs/monitorr_error.log" {
  322. rotate_size 1 # Set max size 1 MB
  323. rotate_age 7 # Keep log files for 7 days
  324. rotate_keep 2 # Keep at most 2 log files
  325. }
  326. basicauth / username userpw
  327. proxy / 192.168.1.103:8084/monitorr { # https://github.com/Monitorr/Monitorr/
  328. without /monitorr
  329. transparent
  330. }
  331. }
  332. ####################################################################################
  333. # Nzbhydra2 subdomain code block example
  334. ####################################################################################
  335. asearches.domain.net http://local.nzbhydra2 {
  336. tls user@domain.net # Email for Let's Encrypt Verification
  337. gzip
  338. log "/logs/nybhydra2_access.log" {
  339. rotate_size 1 # Rotate after 1 MB
  340. rotate_age 7 # Keep log files for 7 days
  341. rotate_keep 2 # Keep at most 2 log files
  342. }
  343. errors "/logs/nzbhydra2_error.log" {
  344. rotate_size 1 # Set max size 1 MB
  345. rotate_age 7 # Keep log files for 7 days
  346. rotate_keep 2 # Keep at most 2 log files
  347. }
  348. proxy / http://192.168.1.103:5076/ { # https://github.com/theotherp/nzbhydra2
  349. transparent
  350. }
  351. }
  352. ####################################################################################
  353. # Ombi subdomain code block example
  354. ####################################################################################
  355. requests.domain.net http://local.ombi {
  356. tls user@domain.net # Email for Let's Encrypt Verification
  357. gzip
  358. log "/logs/ombi_access.log" {
  359. rotate_size 1 # Rotate after 1 MB
  360. rotate_age 7 # Keep log files for 7 days
  361. rotate_keep 2 # Keep at most 2 log files
  362. }
  363. errors "/logs/ombi_error.log" {
  364. rotate_size 1 # Set max size 1 MB
  365. rotate_age 7 # Keep log files for 7 days
  366. rotate_keep 2 # Keep at most 2 log files
  367. }
  368. rewrite {
  369. r ^/dist
  370. to /ombi/{uri}
  371. }
  372. proxy / 192.168.1.103:3579/ombi { # https://github.com/tidusjar/Ombi
  373. without /ombi
  374. transparent
  375. }
  376. }
  377. ####################################################################################
  378. # Organizr subdomain code block example
  379. ####################################################################################
  380. portal.domain.net http://local.organizr {
  381. tls user@domain.net # Email for Let's Encrypt Verification
  382. gzip
  383. log "/logs/organizr_access.log" {
  384. rotate_size 1 # Rotate after 1 MB
  385. rotate_age 7 # Keep log files for 7 days
  386. rotate_keep 2 # Keep at most 2 log files
  387. }
  388. errors "/logs/organizr_error.log" {
  389. rotate_size 1 # Set max size 1 MB
  390. rotate_age 7 # Keep log files for 7 days
  391. rotate_keep 2 # Keep at most 2 log files
  392. }
  393. proxy / 192.168.1.103:8082 { # https://github.com/causefx/Organizr
  394. transparent
  395. }
  396. }
  397. ####################################################################################
  398. # Plex subdomain code block
  399. ####################################################################################
  400. htpc.domain.net http://local.plex {
  401. tls user@domain.net # Email for Let's Encrypt Verification
  402. gzip
  403. log "/logs/plex_access.log" {
  404. rotate_size 1 # Rotate after 1 MB
  405. rotate_age 7 # Keep log files for 7 days
  406. rotate_keep 2 # Keep at most 2 log files
  407. }
  408. errors "/logs/plex_error.log" {
  409. rotate_size 1 # Set max size 1 MB
  410. rotate_age 7 # Keep log files for 7 days
  411. rotate_keep 2 # Keep at most 2 log files
  412. }
  413. proxy / 192.168.1.103:32400 {
  414. transparent
  415. }
  416. }
  417. ####################################################################################
  418. # Portainer subdomain code block example
  419. ####################################################################################
  420. dockdash.domain.net http://local.portainer {
  421. tls user@domain.net # Email for Let's Encrypt Verification
  422. gzip
  423. log "/logs/portainer_access.log" {
  424. rotate_size 1 # Rotate after 1 MB
  425. rotate_age 7 # Keep log files for 7 days
  426. rotate_keep 2 # Keep at most 2 log files
  427. }
  428. errors "/logs/portainer_error.log" {
  429. rotate_size 1 # Set max size 1 MB
  430. rotate_age 7 # Keep log files for 7 days
  431. rotate_keep 2 # Keep at most 2 log files
  432. }
  433. proxy / 192.168.1.103:9000 { # https://github.com/portainer/portainer
  434. transparent
  435. }
  436. }
  437. ####################################################################################
  438. # Radarr subdomain code block example
  439. ####################################################################################
  440. movies.domain.net http://local.radarr {
  441. tls user@domain.net # Email for Let's Encrypt Verification
  442. gzip
  443. log "/logs/radarr_access.log" {
  444. rotate_size 1 # Rotate after 1 MB
  445. rotate_age 7 # Keep log files for 7 days
  446. rotate_keep 2 # Keep at most 2 log files
  447. }
  448. errors "/logs/radarr_error.log" {
  449. rotate_size 1 # Set max size 1 MB
  450. rotate_age 7 # Keep log files for 7 days
  451. rotate_keep 2 # Keep at most 2 log files
  452. }
  453. proxy / 192.168.1.103:7878 { # https://github.com/Radarr/Radarr
  454. transparent
  455. }
  456. }
  457. ####################################################################################
  458. # Sabnzbd subdomain code block example
  459. ####################################################################################
  460. downloads.domain.net http://local.sabnzbd {
  461. tls user@domain.net # Email for Let's Encrypt Verification
  462. gzip
  463. log "/logs/sabnzdb_access.log" {
  464. rotate_size 1 # Rotate after 1 MB
  465. rotate_age 7 # Keep log files for 7 days
  466. rotate_keep 2 # Keep at most 2 log files
  467. }
  468. errors "/logs/sabnzbd_error.log" {
  469. rotate_size 1 # Set max size 1 MB
  470. rotate_age 7 # Keep log files for 7 days
  471. rotate_keep 2 # Keep at most 2 log files
  472. }
  473. proxy / 192.168.1.103:8080 { # https://sabnzbd.org/
  474. transparent
  475. }
  476. }
  477. ####################################################################################
  478. # Sonarr subdomain code block example
  479. ####################################################################################
  480. tv.domain.net http://local.sonarr {
  481. tls user@domain.net # Email for Let's Encrypt Verification
  482. gzip
  483. log "/logs/sonarr_access.log" {
  484. rotate_size 1 # Rotate after 1 MB
  485. rotate_age 7 # Keep log files for 7 days
  486. rotate_keep 2 # Keep at most 2 log files
  487. }
  488. errors "/logs/sonarr_error.log" {
  489. rotate_size 1 # Set max size 1 MB
  490. rotate_age 7 # Keep log files for 7 days
  491. rotate_keep 2 # Keep at most 2 log files
  492. }
  493. proxy / 192.168.1.103:8989 { # https://sonarr.tv/
  494. transparent
  495. }
  496. }
  497. ####################################################################################
  498. # Tautulli Admin subdomain code block example
  499. ####################################################################################
  500. htpcstats.domain.net http://local.tautulli {
  501. tls user@domain.net # Email for Let's Encrypt Verification
  502. gzip
  503. log "/logs/tautulli_access.log" {
  504. rotate_size 1 # Rotate after 1 MB
  505. rotate_age 7 # Keep log files for 7 days
  506. rotate_keep 2 # Keep at most 2 log files
  507. }
  508. errors "/logs/tautulli_error.log" {
  509. rotate_size 1 # Set max size 1 MB
  510. rotate_age 7 # Keep log files for 7 days
  511. rotate_keep 2 # Keep at most 2 log files
  512. }
  513. proxy / 192.168.1.103:8181/tautulli { # https://github.com/Tautulli/Tautulli
  514. without /tautulli
  515. # header_upstream X-Forwarded-Host {host}
  516. transparent
  517. }
  518. }
Advertisement
RAW Paste Data Copied
Advertisement