From 515ccd467cad18cc7a1125ed19e6215118ee07d4 Mon Sep 17 00:00:00 2001 From: fred Date: Thu, 12 Aug 2021 02:11:16 +0200 Subject: [PATCH] vhost template for http/php/astroport gateway bootstrap --- .install/nvh/vhost_php.txt | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .install/nvh/vhost_php.txt diff --git a/.install/nvh/vhost_php.txt b/.install/nvh/vhost_php.txt new file mode 100644 index 0000000..fb94988 --- /dev/null +++ b/.install/nvh/vhost_php.txt @@ -0,0 +1,45 @@ +upstream $domain { + server 192.168.9.$ipvm:$port; #Production + #server 192.168.9.9; #Redirection maintenance +} + +server { + server_name $domain; + listen 80; + include includes/errors.conf; + + location / { + # First attempt to serve request as file, then + # as directory, then fall back to displaying a 404. + try_files \$uri \$uri/ =404; + } + + index index.php; + + # pass PHP scripts to FastCGI server + + location ~ \.php$ { + include snippets/fastcgi-php.conf; + + # With php-fpm (or other unix sockets): + fastcgi_pass unix:/var/run/php/php-fpm.sock; # Faites le ln -s qui va bien + # With php-cgi (or other tcp sockets): + #fastcgi_pass 127.0.0.1:9000; + } + + 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; + +}