I just start Heroku with hobby , but i want subdomain with static IP and SSL how can i do? - heroku

Now i starting to use Heroku with hobby , but i facing problem with SSL
I already add subdomain and using add-on "IPBurger Static IPs"
but i have 2 questions :
when i check IP from https://www.whatsmydns.net/ , it still showing like multiple IP. ex:
23.22.144.165
23.22.52.7
3.216.88.24
3.219.96.23
in case i want to do Whitelist IP, which one is the real outbound IP for my static IP ?
I dont see any option to use SSL, how can i add SSL like let's encrypt ?
Thanks so much

Related

Static website on GCP over HTTPS not working

I have a .dev domain that requires the website to be hosted using HTTPS.
I am hosting a static website on GCP. For the HTTPS Certificate, I've created one using Letsencrypt and also tried using GCP generated Cert.
I am using a Load-Balancer setup to use the HTTPS cert and serve the static website out of Storage bucket.
However when I go to my site I am told it is not secure. I am currently using GCP generated Cert, waited 12 hours and I get the following error.
How can I fix this so that I don't see it, nor need to add an exception. In this case I am even unable to add an exception with a .dev domain.
Also I have a follow up question. How can I force all HTTP traffic to use HTTPS using the Load-Balancer?
I got this working by doing the following:
Change Load-balancer IP from ephemeral to static.
Add A record of Load-balancer IP to DNS record.
Side note: if you got a Static website working with HTTP, you will also need to change the CNAME entry pointing to c.storage.googleapis.com. to an A record with the IP record of the Load-balancer.

How to serve a Heroku app with Google cloud fixed IP

I have a Heroku app that uses nodejs to serve a static web page https://foda-app.herokuapp.com
Heroku does not provide a fixed IP and I really need one for a personal project, so I'm trying to use Google Cloud's VPC reserved static external IP addresses.
I was able to reserve the IP but I'm not sure how should I link it with my Heroku app, since the Google Cloud offers so many options and services. I just wanna redirect all traffic from this IP to the Heroku app and I can't find a simple way to do it.
I need to create a global forwarding rule but I can't find a way to achieve this without using a lot of other services. Do I need a VM instance? Do I need a load balancer? Should I use VPC routes or Cloud DNS? I'm overwhelmed with all those services.
Please can someone tell me if it's possible, and what is the simplest way to achieve this?
You can achieve this using below two ways. -
Use a third party addon on heroku. eg. https://devcenter.heroku.com/articles/quotaguardstatic
Setup a proxy server on the static IP, and redirect all traffic to the desired Heroku url.
Details for step 2 -
Assigning a static external IP address to a new VM instance https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address
Install Nginx/HAProxy on the newly procured VM.
setup config. like below -
upstream heroku-1{
server foda-app.herokuapp.com fail_timeout=15s;
}
server{
listen 80;
server_name yourdomain.example or ip address
location / {
proxy_pass http://heroku-1;
proxy_read_timeout 300;
}
}
Change DNS mapping for your domain(if any) to point to the static IP.

Running HTTPS on EC2 Instance

I’m trying to use HTTPS on my EC2 instance.
Currently, my URL looks like this: 192.168.0.1:8443 and works great.
However, due to HTTPS requirements by Stripe and other applications, I need the url to look like this: https://dev.domain.com
I should add that I am using Cloudflare as my DNS Manager.
I’ve tried Googling how to set this up with no luck. Maybe I’m searching for the wrong thing.
Can someone help me achieve this setup?
Thank you in advance!
You need to configure route53 to create a hosted zone for your website and then you need to add record set where you will point your ec2 server's ip for the particular website request.please follow the link for detailed instructions to setup website with ec2
AWS link
Which web server (httpd/IIS) you enabling on this EC2 instance?
try these steps if it is Linux box
SSL-on-an-instance
I ended up adding rules for ports 80 and 443 to my EC2 instance, and then telling Apache to listen on port 80 instead of 8443. This allowed me to remove the appended :8443 in the URL and I was able to copy the DNS info into Cloudflare as a CNAME and begin using my domain name. Before, I wasn’t able to use my server info as it had to have :8443 appended to the URL which Cloudflare doesn’t like.

Point Root domain to Heroku with static IP

Help! I have an app on Heroku and free QuotaGuard plugin, which gave me two static IP addresses: "Your Static IPs are 54.72.12.1 & 54.72.77.249". Also, I have a domain name learn-reactjs.ru. In my DNS-master I pointed records:
www CNAME www.learn-reactjs.ru.herokudns.com.
# A 54.72.12.1
# A 54.72.77.249
But if I go to learn-reactjs.ru I will get a Heroku error "How did you end up here?". At the same time, I can go to www.learn-reactjs.ru without any problems.
How can I point root domain correctly?
I have solved this problem. I refused static IPs and started using CloudFlare. I set their name servers in my domain provider and my site started working well! After this, I attached SSL certificate which I get in CloudFlare. With the help of CloudFlare, everything turned out to be very simple!

Creating static IP for heroku to connect to external firewall

I'm trying to connect to ObjectRocket with my Heroku app, I'm running into a little problem where I can't seem to set a static IP (tried Proximo for that).
ObjectRocket requires me to define all IP's connecting to the database, so I need a non-dynamic IP for my heroku app.
How could I create this, or is this not possible with Heroku?
Hello you can use this answer to see how to use NGINX as a reverse proxy.
https://stackoverflow.com/a/27874505/1345865
http://blog.talenox.com/post/107675614745/how-to-setup-static-ip-on-heroku
If in your case where you require a outbound reverse proxy, setup an AWS instance and use NGINX to point it to ObjectRocket as your backend

Resources