summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorKjetil Orbekk <kj@orbekk.com>2022-08-28 14:32:33 -0400
committerKjetil Orbekk <kj@orbekk.com>2022-08-28 14:32:33 -0400
commita0fe58c2ac11b6a9ee6c15d4c807b9801c94de7b (patch)
treea166697ea70fd779ec0540914cc3b37194ca0319 /config
parent3ec30317014d1674c990e6ab072b0d26b31f7966 (diff)
remove outdated config
Diffstat (limited to 'config')
-rw-r--r--config/web-server.nix55
1 files changed, 4 insertions, 51 deletions
diff --git a/config/web-server.nix b/config/web-server.nix
index 302dcbd..24f0763 100644
--- a/config/web-server.nix
+++ b/config/web-server.nix
@@ -12,10 +12,10 @@ in {
systemd.services.nginx.serviceConfig = {
# I used to store web files in /home.
# ProtectHome = "read-only";
- ReadWritePaths = [
- "/storage/srv/kj.orbekk.com/tmp/hls/"
- "/storage/srv/kj.orbekk.com/dav/"
- ];
+ #ReadWritePaths = [
+ # "/storage/srv/kj.orbekk.com/tmp/hls/"
+ # "/storage/srv/kj.orbekk.com/dav/"
+ #];
UMask = lib.mkForce "0007";
};
@@ -38,25 +38,6 @@ in {
aio on;
directio 512;
'';
- appendConfig = ''
- rtmp {
- server {
- listen 1935;
- allow publish 10.0.0.0/8;
- deny publish all;
- allow play all;
- chunk_size 4906;
- application live {
- live on;
- record off;
- hls on;
- hls_path /storage/srv/kj.orbekk.com/tmp/hls/;
- hls_fragment 1s;
- hls_playlist_length 2s;
- }
- }
- }
- '';
virtualHosts = let
template = {
enableACME = true;
@@ -75,34 +56,6 @@ in {
extraConfig = ''
autoindex on;
'';
- locations."/hls" = {
- extraConfig = ''
- default_type application/octet-stream;
-
- # Disable cache
- # add_header Cache-Control no-cache;
-
- # CORS setup
- add_header 'Access-Control-Allow-Origin' '*' always;
- add_header 'Access-Control-Expose-Headers' 'Content-Length';
-
- # allow CORS preflight requests
- if ($request_method = 'OPTIONS') {
- add_header 'Access-Control-Allow-Origin' '*';
- add_header 'Access-Control-Max-Age' 1728000;
- add_header 'Content-Type' 'text/plain charset=UTF-8';
- add_header 'Content-Length' 0;
- return 204;
- }
-
- types {
- application/vnd.apple.mpegurl m3u8;
- video/mp2t ts;
- }
-
- root /storage/srv/kj.orbekk.com/tmp/;
- '';
- };
locations."/dav" = {
root = "/storage/srv/kj.orbekk.com";
extraConfig = ''