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;