Artifact Content
Not logged in

Artifact 3781a423f9a0f00fa3589838d290ee38ef841b51:


nginx virtual hosts setup

Create a wallet1.com.conf file in servers or conf.d folder in your ngnix path with the below content (edit the paths).

For development

``` server { listen 443 ssl;

server_name wallet1.com www.wallet1.com;

ssl_certificate /usr/local/etc/nginx/certs/wallet1.com.pem;
ssl_certificate_key /usr/local/etc/nginx/certs/wallet1.com.pem;

location / {
    proxy_pass http://localhost:3000/;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_cache_bypass $http_upgrade;
}

location /api/ {
	proxy_pass http://localhost:3100/;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_cache_bypass $http_upgrade;
}

location /.well-known/webfinger {
	proxy_pass http://localhost:3100/webfinger;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_cache_bypass $http_upgrade;
}

location /ledger/ {
	proxy_pass http://localhost:3101/;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_cache_bypass $http_upgrade;
}

} ```

For Production

``` server { listen 443;

server_name wallet.com www.wallet.com;

ssl_certificate /usr/local/etc/nginx/certs/wallet1.com.pem;
ssl_certificate_key /usr/local/etc/nginx/certs/wallet1.com.pem;

root /your/path/to/ilp-kit/client/build;
index index.html;

location / {
    try_files $uri $uri/ /index.html =404
}

location /api/ {
    proxy_pass http://localhost:3100/;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_cache_bypass $http_upgrade;
}

location /.well-known/webfinger {
    proxy_pass http://localhost:3100/webfinger;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_cache_bypass $http_upgrade;
}

location /ledger/ {
    proxy_pass http://localhost:3101/;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_cache_bypass $http_upgrade;
}

} ```

do the same for wallet2.