mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-27 23:14:04 +00:00
Add nginx service for public apps
This commit is contained in:
parent
489496551d
commit
daf794745f
|
@ -0,0 +1,64 @@
|
|||
server {
|
||||
listen 6001 ssl;
|
||||
server_name public_apps_lnbits;
|
||||
|
||||
include /etc/nginx/mynode/mynode_ssl_params.conf;
|
||||
|
||||
ssl_certificate /home/bitcoin/.mynode/https/public_apps.crt;
|
||||
ssl_certificate_key /home/bitcoin/.mynode/https/public_apps.key;
|
||||
|
||||
access_log /var/log/nginx/access_public_apps.log;
|
||||
error_log /var/log/nginx/error_public_apps.log;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:5000;
|
||||
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
#proxy_set_header Connection 'upgrade'; # No longer needed post v0.10
|
||||
proxy_http_version 1.1;
|
||||
|
||||
include /etc/nginx/mynode/mynode_ssl_proxy_params.conf;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 6002 ssl;
|
||||
server_name public_apps_btcpay;
|
||||
|
||||
include /etc/nginx/mynode/mynode_ssl_params.conf;
|
||||
|
||||
ssl_certificate /home/bitcoin/.mynode/https/public_apps.crt;
|
||||
ssl_certificate_key /home/bitcoin/.mynode/https/public_apps.key;
|
||||
|
||||
access_log /var/log/nginx/access_public_apps.log;
|
||||
error_log /var/log/nginx/error_public_apps.log;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:49392;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
|
||||
include /etc/nginx/mynode/mynode_ssl_proxy_params.conf;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 6003 ssl;
|
||||
server_name public_apps_lndhub;
|
||||
|
||||
include /etc/nginx/mynode/mynode_ssl_params.conf;
|
||||
|
||||
ssl_certificate /home/bitcoin/.mynode/https/public_apps.crt;
|
||||
ssl_certificate_key /home/bitcoin/.mynode/https/public_apps.key;
|
||||
|
||||
access_log /var/log/nginx/access_public_apps.log;
|
||||
error_log /var/log/nginx/error_public_apps.log;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3000;
|
||||
|
||||
include /etc/nginx/mynode/mynode_ssl_proxy_params.conf;
|
||||
}
|
||||
}
|
|
@ -711,6 +711,14 @@ echo "Generating certificates..."
|
|||
/usr/bin/mynode_gen_cert.sh https 825
|
||||
/usr/bin/mynode_gen_cert_electrs.sh
|
||||
|
||||
# Ensure copy has been made for public_apps certificate (overwritten by premium+, but needed to start nginx)
|
||||
if [ ! -f /home/bitcoin/.mynode/https/public_apps.crt ]; then
|
||||
cp -f /home/bitcoin/.mynode/https/myNode.local.crt /home/bitcoin/.mynode/https/public_apps.crt
|
||||
fi
|
||||
if [ ! -f /home/bitcoin/.mynode/https/public_apps.key ]; then
|
||||
cp -f /home/bitcoin/.mynode/https/myNode.local.key /home/bitcoin/.mynode/https/public_apps.key
|
||||
fi
|
||||
|
||||
# Setup nginx HTTPS proxy
|
||||
mkdir -p /var/log/nginx || true
|
||||
mkdir -p /etc/nginx || true
|
||||
|
|
Loading…
Reference in New Issue
Block a user