Building RPC,API

Buy a domain

Put domain to https://www.cloudflare.com/arrow-up-right

Installing Dependencies and Setting Up Nginx

sudo apt -q update
sudo apt -qy install curl git jq lz4 build-essential snapd unzip nginx
sudo apt -qy upgrade

API Nginx Configuration File Creation

sudo nano /etc/nginx/sites-available/airchains-testnet-api

edit this:

server {
    listen 80;
    server_name airchains-testnet-api.apollo-sync.com;

    location / {
        add_header Access-Control-Allow-Origin *;
        add_header Access-Control-Max-Age 3600;
        add_header Access-Control-Expose-Headers Content-Length;
        
        proxy_pass http://127.0.0.1:1317;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

RPC Nginx Configuration File Creation

edit this:

Activating Your Configuration

SSL Configuration

if not work, run this, then try again

Editing the app.toml File

root/junction/config/app.toml

Change the indicated false to true.

Last updated