From e95f4be11a084f19d3689184ae1032964e7f3601 Mon Sep 17 00:00:00 2001 From: qo-op Date: Thu, 17 Dec 2020 13:06:33 +0100 Subject: [PATCH] nginx config files for astrxbian & jukebox --- .install/templates/nginx/astrxbian.conf | 24 ++++++++++++++ .install/templates/nginx/jukebox.conf | 42 +++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 .install/templates/nginx/astrxbian.conf create mode 100644 .install/templates/nginx/jukebox.conf diff --git a/.install/templates/nginx/astrxbian.conf b/.install/templates/nginx/astrxbian.conf new file mode 100644 index 0000000..7bfba67 --- /dev/null +++ b/.install/templates/nginx/astrxbian.conf @@ -0,0 +1,24 @@ +server { + + listen 10021; + listen [::]:10021; + + root /var/www/astrxbian/; + + server_name _; + +# IPFS GATEWAY PROXY + location /ipfs { + proxy_pass http://127.0.0.1:8181; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $remote_addr; + } + + location /ipns { + proxy_pass http://127.0.0.1:8181; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $remote_addr; + } + +} + diff --git a/.install/templates/nginx/jukebox.conf b/.install/templates/nginx/jukebox.conf new file mode 100644 index 0000000..6203ed9 --- /dev/null +++ b/.install/templates/nginx/jukebox.conf @@ -0,0 +1,42 @@ +server { + + listen 10011; + listen [::]:10011; + + root /var/www/jukebox; + + server_name _; + + # This section can be copied into an existing default setup + location / { + allow all; + index index.php index.html index.htm; + location ~ \.php { + try_files $uri index.php =404; + fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + fastcgi_read_timeout 1800; + } + error_page 404 = /error/404.html; + try_files $uri $uri/ =404; + location ~ /albumart/* { + expires -1s; + } + } + +# IPFS GATEWAY PROXY + location /ipfs { + proxy_pass http://127.0.0.1:8181; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $remote_addr; + } + + location /ipns { + proxy_pass http://127.0.0.1:8181; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $remote_addr; + } + +}