I have just pushed a Spring Boot / VueJS application to Pivotal Cloud Foundry and was wondering how I change the URL for the website?
When I pushed the application they gave me a URL of http://crdeckhelper.cfapps.io/
I went to godaddy and bought a domain of crwardecks.com
How do I make my application run on crwardecks.com?
I currently have godaddy re-routing the person to the URL that cloud foundry generated for me, but this is not the behavior that I want.
I have read the documentation on Pivotal but for some reason it confuses me. I have also searched for this on the web but wasn't able to find a good resource.
There's a couple things you need to do.
Add your domain to Cloud Foundry. Run cf create-domain.
https://docs.run.pivotal.io/devguide/deploy-apps/routes-domains.html#private-domains
Map a route under this domain to your app. Run cf map-route <app> <domain> ....
https://docs.run.pivotal.io/devguide/deploy-apps/routes-domains.html#map-route
At this point, you'll have the domain and route set up in CF, but nothing is sending traffic to CF.
To send traffic to your CF, you need to make an adjustment in your DNS records. Again, there's a couple of options.
You can route traffic for just one subdomain to the app, by creating a CNAME record that points from your custom domain to the domain assigned by CF. Ex: CNAME: www.example.com -> crdeckhelper.cfapps.io.
You can route traffic for all subdomains with a wildcard. Again we use a CNAME record but this time we use a wildcard. Ex: CNAME: *.example.com -> *.cfapps.io (or you could use some subdomain, like *.sub.cfapps.io).
Both are described more here. Also, cfapps.io is part of Pivotal Web Services. If you use a different provider then your shared domain will be different.
At this point, you should have traffic routing to CF & CF should be routing traffic to your specific app. Your done & you can stop reading, unless you are trying to map a root domain to your app.
There's an edge case around root domains (i.e. example.com, not www.example.com), because DNS CNAME records don't work for a root domain. Some DNS providers support ALIAS or ANAME records, which work like a CNAME record for root domains. If your provider does, you can give it a try (see your DNS provider's doc for instructions on how to use). If not, see if your provider supports URL forwarding. Many DNS providers will automatically redirect HTTP traffic on the root domain to a sub domain you specify, like example.com -> HTTP 302 -> www.example.com.
For more on root domain setup, see Configuring DNS for Your Registered Root Domain at the following link.
https://docs.run.pivotal.io/devguide/deploy-apps/routes-domains.html#domains-dns
As a last resort, you could use an A record, but you need to be very careful because your CF providers may not have static public IPs, rather their IPs can change. If you use an A record and your provider's IP changes, traffic will stop flowing to your app & you'll need to update your A record to point to their new IPs (you can get your provider's IPs by running dig <app-dns> or nslookup <app-dns>. If you go this route, make sure you have monitoring to quickly catch when IPs change.
Hope that helps!
Related
Is there a way to run webflow & ghost together where - https://example.com/* is served by webflow and https://example.com/blog/* is served via my self hosted ghost server.
How do I put the IP of my ghost server in my domain's DNS record?
Or is there any other way to do this?
You could use subdomains instead of an extended URL.
Reference blog.example.com to the IP address of your ghost server.
To reference:
Connect a custom domain to the webflow site.
Go to the DNS manager of the custom domain.
If you have an IP address for the ghost server, then:
Add an A record with NAME = [subdomain] (here [subdomain] = blog) and Value = [IP address]
else If you have a domain name for the ghost server, then:
Add an CNAME record with NAME = [subdomain] (here [subdomain] = blog) and Value = [Domain Name]
You can only achieve this if you have an active webflow hosting using
a paid site plan which enables you to add a custom domain.
I would not recommend using a subdomain for your blog, for SEO reasons.
So if you want to use your hosted Webflow site in combination with a (own hosted) Ghost blog on the same domain name, for example on yourdomain.com/blog/ one way of achieving this by setting up a reverse proxy.
Your can read the whole set up here:
https://signoz.io/blog/webflow-ghost-subdirectory/
You would need to setup an independent reverse proxy server - using a web server such as Nginx or Caddy. You would then point your root domain to this server and reverse proxy to both your Webflow site and your Ghost site depending on the URL route.
Alternatively you could try to do this using Cloudflare Workers (Google for "using cloudflare worker as reverse proxy") or for a no code / managed solution you could try a service such as HostForward which does it all for you.
First post here - hello fellow stackoverflowers :)
Website issue.
Bought domain on Google, hosting on S3. Used route 53 to redirect requests.
Created 2 public buckets in S3, example.com and www.example.com (example.com redirecting to www)
WEBSITE WORKS - YES! Now let's get it https
Got the SSL amazon certificate for *.example.com via route 53 DNS confirmation.
Uploaded it to my cloudfront distribution ( and in the parameters ensured http redirects to https).
Following this article (How to redirect HTTP to HTTPS using S3, Cloudfront, and Route 53 using naked domains? ), I now need to redirect requests from route 53 towards the Cloudfront domain name.
But the Cloudfront domain name gives an error message ( see below). Where could it come from? (I understand this should be the https website link no?)
error message
FYII don't use an EC2 instance. I understand there is another way of getting an SSL by passing through providers like Namecheap - but it seems much more complicated ( compared to Amazon doing it for free).
Probably your CloudFront origin is pointing at the wrong endpoint. Don't pick the auto-suggested bucket from the origin list, instead explicitly copy the endpoint shown in your S3 bucket under "Static website hosting", which should look something like example.com.s3-website-us-east-1.amazonaws.com. Otherwise you're pointing at the S3 bucket HTTP interface, not the website host.
Just to make sure, the entire process is basically:
Set up the domain zone in Route 53 first, so it exists for the next step.
In region US-East-1 (N. Virginia, important!), create a certificate request for the domain in Certificate Manager. Use DNS validation, and let AWS auto-insert the required records to your Route 53 configuration you created in 1.
Create the S3 bucket.
Explicitly set a custom bucket policy to allow anonymous access.
Enable "Static website hosting" for the bucket. Note the displayed endpoint.
Create a CloudFront distribution, add your domain name as Alternate Domain Name, choose the certificate created in 2. from the list, add the endpoint noted in 5. as origin.
Update the Route 53 configuration to add an A (and AAAA) alias record, pointing to the CloudFront distribution, which you can choose from the auto-suggested list.
Wait until everything is deployed.
Especially the certificate you'd want to create as described, since this allows it to auto-renew and you won't have to worry about it. CloudFront can only automatically use certificates created in region US-East-1, creating your certificates elsewhere means you'll need to down/upload them manually, and do that every time they expire.
I am building a website that has both an app and a control panel. I want the app to live at someurl.com and the control panel to be at controlpanel.someurl.com.
I have the someurl.com app setup, however the sub domain has confused me. From what I gather, the subdomain needs to be setup using the host of “controlpanel” and that it should point at a URL (e.g 115.110.145). My question is, what url should the subdomain point at, as firebase only gives me one URL.
All domains that are connected to Firebase Hosting utilize the same anycast IP addresses -- the Firebase Hosting serving infrastructure looks at the hostname of incoming requests to match to verified domains.
I'd recommend just following the steps in the docs and would reach out to Firebase support if you get stuck in a specific place.
I am building an eCommerce platform and I would like to give my user's the ability to point their domain (e.g. bobsburgers.com) to an HTTPS-protected subdomain on my site (e.g. bobsburgers.shoplolz.com). Getting a wildcard certificate for the dynamic subdomain is simple, but how does one allow their users to use their own domain while requiring HTTP? I'm currently hosted on Heroku but I'm curious at a higher level how this can work, if at all.
Based on my research the only way to do this is to have the site owner upload an SSL certificate and use an HTTPS-enabled reverse proxy which can be configured dynamically to accept new SSL certificates for newly added domains.
I manage a hosting server using WHM. I have two cPanel accounts on this server, one for exampletest.com (account name is exampletest) and one for example.com (account name example). We have a Wordpress site that was working well at exampletest.com but we keep running into problems when we try to migrate it to example.com. I believe it has to do with one WordPress plugin that doesn't migrate well.
So we had the idea to simply take the example.com domain and point it to the exampletest cPanel account, then update the domain for WordPress in the database. However, one potential issue I can see is that we have many active email addresses on the example account. I fear that associating the example.com domain to the exampletest account will break the email addresses.
Keeping the above in mind, I have a couple questions:
Will associating the example.com domain to the exampletest account break the emails? If so, is there a workaround (moving the email addresses to the new account somehow?)
Is there a better way to go about doing this that I'm not thinking of?
The best way of transferring your wordpress site would be to copy the files, create a database user with the same login details and import the database. Wordpress shouldn't be able to tell the difference.
One way would be to assign a static IP address to exampletest and point example.com's A record to that IP.
Due to the way WHM's DNS and port binding is set up it will not let you set up the same domain on two seperate accounts.
You could treat www. as a seperate subdomain and add the subdomain www.example.com to exampletest as an addon domain and remove the www A record from example first. Redirect all web traffic from example.com to www.example.com or use another sub-domain such as www2.
Another option would be transfer the emails, you can either use the transfer tools in WHM > Transfers or use http://imapsync.lamiral.info/