From f06bac4086b387f721908781b21617c0c66b1faf Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 11 Aug 2021 23:50:16 +0200 Subject: [PATCH] =?UTF-8?q?r=C3=A9flexion=20et=20proposition=20de=20soluti?= =?UTF-8?q?ons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .install/nvh/nvh.sh | 5 +++++ .install/nvh/vhost.txt | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/.install/nvh/nvh.sh b/.install/nvh/nvh.sh index d6dcdab..dd874c1 100755 --- a/.install/nvh/nvh.sh +++ b/.install/nvh/nvh.sh @@ -104,4 +104,9 @@ fi # [[ ! $(ipfs p2p ls | grep '/x/10101') ]] && ipfs --timeout=5s ping -n 1 /p2p/$IPFSNODEID && ipfs p2p forward /x/10101 /ip4/127.0.0.1/tcp/20101 /p2p/$IPFSNODEID # A l'autre boût on sort domain=tata.toto.com ip=local port=20101 ssl=yes +## PAR défaut tous publient ~/.zen/astrXbian/www/boris sur leur port 80 / 443 (pour éxécuter l'API PHP) + +# Ca ressemble au fonctionnement du ln -s ;) +# ipfs p2p ln -s /p2p/$IPFSNODEID/tcp/10101 /ip4/127.0.0.1/tcp/20101 + exit 0 diff --git a/.install/nvh/vhost.txt b/.install/nvh/vhost.txt index be0080d..0ee3770 100644 --- a/.install/nvh/vhost.txt +++ b/.install/nvh/vhost.txt @@ -17,6 +17,18 @@ server { proxy_redirect off; } + 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; + } + error_log /var/log/nginx/$domain_error.log; access_log /var/log/nginx/$domain_access.log;