How to Setup Static IP Heroku

Reading Time: 2 minutes

Static IP Heroku can be done by using NGINX reverse proxy hosting on EC2 with an elastic IP address instance. Talenox currently uses static IP addresses for our biometric hardware devices to connect to our Heroku backend.

 

Here’s how to do it

1. Launch an instance with your desired instance type. (Micro, Small, etc)

2. SSH into your instance to install NGINX

sudo apt-get update
sudo apt-get install nginx

3. Configure nginx. The proxy_set_header is the most important setting for it to work properly with Heroku, or you will face an error with “Heroku | No Such App”

        upstream backend  {

                server xxx.talenox.com;

        }

        server {

                listen          80;

                server_name     rpb1.talenox.com;

                location / {

                        proxy_pass              http://backend;

                        proxy_redirect          off;

                        proxy_set_header        X-Forwarded-For $remote_addr;

                        proxy_set_header        Host ‘xxxxx.herokuapp.com’;

                }

        }

4. nginx -s reload

All done! Head to http://(your elastic ip address) and it should work!

SELECTED FOR YOU  The Full Guide To Maternity Leave in Singapore 2022

Got a business and employees to track?

Our payroll software enables you to pull data from your timesheets and biometric devices. Try us out now.


Liked this article? You may also be interested in reading:
Introducing: The Billing Dashboard
How-to: Set up your StaffAny-Talenox Integration
How to Integrate Heroku Status Alerts into Slack

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.