I am currently developping a SASS web application, and I want to deploy my react app under an url like "https://app.my-website.example". So I tried to buy the domain name "app.my-website.example", but apparently, domain name cannot contain "." character.
How can I deploy it under an url like "https://app.my-website.example" ?
I have seen quantity of modern websites with url containing "app." at the beginning.
For example, website about crypto usually have a traditional static website describing the project, deployed on an url like "https://website.example". And then, their actual application, which does stuff, is deployed on an url like "https://app.website.example".
This is also true for most web application out there.
I use AWS Amazon cloud if it helps you answer me.
Btw, I have already bought the domain name like "my-website.example" and have deployed my static website on it.
Here is the solution.
So the answer to my question is that I need to create a sub domain inside my main domain.
I don't need to buy anything else to create the subdomain, since I already own the domain. It is the main advantage compared to buying "app-mywebsite.com". Plus, it will be easier for google to reference my app.
On amazon, you need to go to the "route 53" service to create the subdomain and then redirect it to you application. The doc to do that is here :
https://aws.amazon.com/premiumsupport/knowledge-center/create-subdomain-route-53
Related
first of all I'm not sure how I can explain myself since I'm not native English speaker but please bear with me in the following scenario: I have a lot of customers where they need a simple blog website with their own domain name, instead of me registering on host service provider and deploying that blog website manually I'm looking for a better automated solution for example it would make a lot of sense if they use my own platform so after a successful registration/payment on my platform their website is deployed independently on private server instance (with their own specific config) ... Im not really looking for an answer on exactly how to implement that but what that process is called (the deployment part) or under what category should I dig to learn more. your advice is much appreciated.
There can be multiple approaches to solve the problem.
However, simple one will be using AWS SDK to create EC2 instances with Bitnami wordpress image.
You can trigger the API with parameters which will auto-install wordpress, configure dns and other stuff and provide the ready to use website within seconds.
So I have deployed a Google Cloud Function to some place like this:
https://us-central1-my-project.cloudfunctions.net/my-function
I can successfully render a dynamic webpage like this:
https://us-central1-my-project.cloudfunctions.net/my-function?slug=foo
Now, I would like to put this behind a regular URL so it works like this:
https://my-domain.com/some-directory/foo
I would like for it to be https instead of http. And notice that I added some-directory above the foo slug, so there is a little bit of rewriting logic there.
So basically go from here to here:
https://us-central1-my-project.cloudfunctions.net/my-function?slug=foo
https://my-domain.com/some-directory/foo
The question is how to do this. Wondering if you could walk me through how to do it which I think would also help future googlers.
When I search "custom domain for google cloud function" I get this which is for "endpoints" or "openapi" or I don't know, but it doesn't quite seem related. However, I went ahead anyways and changed my DNS nameservers to match what they said:
A 198.51.100.0
A 198.51.100.2
A 198.51.100.4
A 198.51.100.6
AAAA 2001:db8:ffff:32::15
AAAA 2001:db8:ffff:34::15
AAAA 2001:db8:ffff:36::15
AAAA 2001:db8:ffff:38::15
But I am lost as to what to do next. The documentation for Google Cloud is nothing compared to AWS which is unfortunate.
This is as close to what I've found so far, but it's still not even close to getting it working. Maybe this is closer to what I want.
Actually, is possible using Endpoints for cloud functions:
https://cloud.google.com/endpoints/docs/openapi/get-started-cloud-functions
After you have running your API or function in Cloud Run you just need to do a mapping with your custom domain (https://cloud.google.com/run/docs/mapping-custom-domains) and redeploy the OpenApi specification with the new host.
This is not possible using Google Cloud Functions deployed in a GCP project.
Currently, the only way to map a custom domain to your HTTP/S triggered functions is by using Firebase Functions and Firebase Hosting.
After creating the custom domain, you can configure the domain to handle HTTPS/S triggered functions.
I'm sorry for being dumb, but I am really stuck for few days. This is my first time using AWS. I have successfully installed LAMP web server under t1.micro on my customer's AWS account http://54.72.132.215/ following this tutorial . But I don't know what to do next after the installation. My goal is:
Setup a Domain
Run a Prestashop.
I hope you can guide me to the right path, I am totally lost. Thanks.
You need to register a domain with someone, this is outside of Amazon. Just google domain name registrars:
https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=domain%20name%20registrar
Then you'll need to point your domain to your Amazon EC2 instance. I would suggest using Route 53 to do this, another Amazon AWS service that makes it easier to setup and control your domains:
http://aws.amazon.com/route53/
Once you have that setup, visiting your name domain should show the default apache It works! page, if you've correctly setup your LAMP server. It'll look something like these:
https://www.google.co.uk/search?q=default+apache+web+page&espv=2&source=lnms&tbm=isch&sa=X&ei=yRfWU_v8OeHe7Abp1ICICw&ved=0CAYQ_AUoAQ&biw=1457&bih=881#imgdii=_
You'll want to add a new vhost for your new PrestaShop site, this will allow you to setup a specific set of files to serve for your new URL, and means you can add other sites to the server later on. Just a quick google shows multiple tutorials on doing this, here's one of them:
http://calebogden.com/multiple-websites-amazon-ec2-linux-virtual-hosts/
Then follow the tutorial in the PrestaShop documentation about installing PrestaShop via the command line:
http://doc.prestashop.com/display/PS16/Installing+PrestaShop+using+the+command-line+script
Now I'm guessing that all those steps in one go is a little overwhelming, so I would suggest you break this task down into chunks and work on them one at a time, and post a few different questions on StackOverflow and probably ServerFault: https://serverfault.com/, as that is better suited to setting up servers.
To summarise you need to:
register a domain name and point it to your EC2 server, you should see the default apache page
create a new vhost to server web pages for your new domain
follow the guide on PrestaShop about installing the software
Treat each of those a separate task. This question covers lots of topics in one very general idea, the full answer to your problem wouldn't really fit in a single post.
ServerFault will probably have a lot of your answers already, regarding setting up domains and vhosts at least.
I'm using Amazon S3 to host static files for my website. Now I wanted to add Wordpress blog, which would be hosted in /blog subfolder. I followed an article which explains the easiest way to install Wordpress on EC2 on Microsoft Windows server here:
http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/EC2Win_CreateWordPressBlog.html
I'm wondering how can I set /blog/* subfolder of my static site on S3 to rewrite all urls to a blog hosted on EC2.
How is that possible?
Thanks for help
As far as I know that's not possible. S3 supports redirects, but it won't act as a proxy for your dynamic content as there's no concept of URL "rewriting" (which can only really happen at the webserver level unless you're redirecting to a completely different domain). You have a few alternatives though.
Host your wordpress blog on a subdomain. blog.yourdomain.com keeps your blog and you just link to it from your static site.
Find a way to generate static files from your wordpress blog and put those files in the blog "subfolder". There are wp plugins that will do this I believe.
Just thought of a new one. Set up cloudfront in front of your website and use behaviors to forward requests to your blog server.
There is a final option where you make your default 404 page into a little js application that acts as a router for fetching pages from your wordpress backend but hahahahaha don't do that.
I've got a little Django site in which users can link to images on other sites in their comments. It's by no means a core feature.
I've just moved the entire site to SSL. That has worked fine for the most part but remote images are obviously not always going to be available over SSL. Only the slightest number of domains have valid certificates.
What's the best way to funnel images through then?
Download them when the user posts and alter the URL to a local one?
Make a proxy that just proxies another URL?
The second seems like less work (I feel like it would be possible just with NGINX rules) but that it would also open the site up to people using my proxy for their own nefarious gain... Which I'd like to avoid.
What's the best compromise here?
Github ran into this same issue when they moved to HTTPS everywhere and detailed it in their blog: https://github.com/blog/743-sidejack-prevention-phase-3-ssl-proxied-assets
Their solution was to create a proxy server which they open sourced as https://github.com/atmos/camo To address the same concerns about abuse of the proxy it is deployed with a shared secret with the application server. Integrating this would a Django project would be straight forward as you would just need to generate the digest from the shared key for the given image url.