Building RPC,API
Buy a domain
Put domain to https://www.cloudflare.com/
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 upgradeAPI Nginx Configuration File Creation
sudo nano /etc/nginx/sites-available/airchains-testnet-apiedit 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
sudo nano /etc/nginx/sites-available/airchains-testnet-rpcedit this:
server {
listen 80;
server_name airchains-testnet-rpc.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:26657;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}Activating Your Configuration
sudo ln -s /etc/nginx/sites-available/airchains-testnet-* /etc/nginx/sites-enabled/sudo nginx -tsudo systemctl reload nginxSSL Configuration
sudo certbot --nginx --register-unsafely-without-emailif not work, run this, then try again
sudo apt install certbot python3-certbot-nginxEditing the app.toml File
root/junction/config/app.toml
Change the indicated false to true.

Last updated