Setting up a sub-domain on Digitalocean - reactjs

How do I set up a sub-domain for a Reactjs website on Digitalocean using droplet?

I will assume you already have a domain set up:
First make sure you have the droplet up and running.
Then under Networking tab, go to Domains. Choose your domain, let's say "example.com"
Then you will be presented with the "create a new record" screen. There you add a new A record.
Type in there the full path, for example "demo.example.com" as hostname. And then choose the droplet you just created from the "will redirect to" dropdown. Click "create record" and you're done.

Related

GAE Custom domain mapping failure after adding SSL Wildcard certificate

We have three projects in Google App Engine, each of them have a custom sub-domain name mapped to it like this:
Project A: projecta.domain.com
Project B: projectb.domain.com
Project C: projectc.domain.com
That worked very well until we added a wildcard ssl-certificate to Project A. Suddenly all three subdomains are mapped to Project A.
They appeared under Project A, custom domains (Project A->App Engine->Settings->Custom Domains) and not one under each Project B and Project C, and when browsing to projectb.domain.com and projectc.domain.com, we get content from projecta.domain.com and not from b and c.
We have tried this but none of it fixes the problem:
Removed the SSL-certificate
Removed all custom domains and added them again
Disabled all projects, removed all domains, added them again
and enabled the projects
Logged in as different users, verify the domain again, add/remove etc
Two more notes:
We also have a fourth project, Project D (projectd.domain.com), which strange enough has not been affected and still works.
When trying to add a custom domain under project B or C (Project [B/C]->App Engine->Settings->Custom Domains), clicking on Add button does not give any response at all. Checking network, the click performs a call to Console servers, and when checking Project A (App Engine->Settings->Custom Domains), the custom domain name has appeared there instead.
Edit 1:
After deleting all custom domains in every project, when trying to add custom domain projectb.domain.com to Project B, we get this error message "This domain points to another app. If you point it to this app, the other app will stop working." But it does not appear in any another app. After confirming domain is not added.
Edit 2:
After deleting all custom domains in every project, when adding projectb.domain.com to Project B first, nothing appears. But when adding projecta.domain.com to Project A afterwards, both projectb and projecta appears under Project B. And when trying to delete projecta from projectb, we get the error message "Error. Failed to delete mapping.". Something is really wrong here.
Does anyone know how to access the domain mappings settings in any other way? It seams like the domain mapping data has been corrupted and we are stucked.
Edit 3:
For some unknown reason everything worked again after 8 hours of trying and failing, and I have no idea why. Suddenly I could delete all custom domains and when I added them they appear under the correct project. I've tried the exact same thing several times before. However, when I now add the SSL-certificate again every custom domain mapping moved by itself from their own project to the very project I added the SSL certificate to. Can somehow the SSL-certificate change the domain mappings?
I found a solution! There is a bug in Google App Engine Console when adding custom domains and connect to a ssl-certificate in different project right after each other.
ADDING CUSTOM DOMAINS
Steps to reproduce the bug:
Select a project in the toolbar
Goto App Engine->Settings->Custom Domains and after pressing "Add Custom Domain", add a sub-domain and press "Add"
Nothing happens, but when going back to "Custom Domains" the new subdomain appears there
Change project in the toolbar
Click on "Custom Domains", press "Add Custom Domain"
Add a sub-domain and press "Add"
The domain added in step 6 is now in fact mapped to the project selected in step 1.
Workaround
Make a page refresh in the browser between step 5 and 6.
CONNECT SEVERAL PROJECT TO WILDCARD SSL-CERTIFICATE
Steps to reproduce the bug
After uploading a Wildcard SSL-certificate
Select a project in the toolbar
Goto App Engine->Settings->SSL Certificate
Click on your SSL-certificate, then check the domain and press "Save"
Change project in the toolbar
Click on "SSL Certificate",
Click on your SSL-certificate, then check the domain and press "Save"
The custom domain previously connected to the project selected in step 5 is now added to the project selected in step 2.
Workaround
Make a page refresh in the browser between step 6 and 7.

Get custom domain name to work with app engine instance?

I have a domain name purchased via google domains. I want to point it to my app engine instance. In the "custom domains" settings tab in the app engine console, I have the following:
I want both the "bare" and "www" flavors to point to my app engine instance:
http://example.com
http://www.example.com
I'm not sure which option to use for step #2 to get that to work?
Thanks
You'd be following the Adding a custom domain for your application procedure, with focus on section 4:
4. Continue to the next step the Add new custom domain form, selecting the custom domain you want to point to your App Engine app:
a. Refresh the console domain page so it will list the domains properly.
b. If you want to use a subdomain, such as www, use the second option (http://www.example.com).
c. If you want to use a naked domain, use the first option to specify a naked domain (such as http://example.com).
d. Click Add to create the desired mapping.
You need to specifically add both the naked domain and the www subdomain, explicitly, by running the entire section 4 twice, once selecting 4c and once selecting 4b, respectively.
To do that at step #2 (in the Add a custom domain screen illustrated in your image) you first select the 1st radiobutton, for http://example.com and click Add. Unfortunately you don't see this addition displayed anywhere in the developer console (AFAIK). When the custom domain config was done through Google Apps the naked domain was visible explicitly, but that's no longer available.
Then come back at the Add a custom domain screen and at step #2 select the 2nd radiobutton, fill in www in the text input area (if needed), select example.com from the dropdown list (if needed) and click Add. This adddition should cause a new entry to be listed in the Custom Domain main screen (the parent screen), with a www.example.com Custom domain name and a www Alias.
This should be all (it may take a while for the DNS changes to propagate to your machine so that you can verify the effects, the doc mentions up to 24h).

Google app engine own domain

Im having trouble with Google App Engine and using my own domain. I have a domain that i'm also using in Google Apps for Work.
I have connected my GAE project in Google Apps so they are linked.
I have added my custom domain in GAE, verified ownership and it seems to be correct.
Here is a picture of the GAE settings.
And on Google Apps for work.
The other setting I know I have to do is on my domain registrar. I have added the records from GAE, from the picture I uploaded.
Im using one.com as a domain registrar and my DNS settings look like this:
Am I doing something wrong that you can see directly like "Hey what's this guy doing lol" or does it seem correct at first sight?
Thankful for any help in the right direction.
#
EDIT:
After following the tip from comment, I have verified and mapped the domain "lkpgpremiumcars.com". And added "beta" as subdomain. My "Custom domains" looks the same (like below):
I also removed A and AAAA-records and added a CNAME.
Waiting for DNS update to see if it works.
EDIT 2:
Still dont work.
BTW is it normal behavior that if I select the same subdomain again it says this:
Or is is just because it already points to this app?
You'll need to add this as a sub-domain.
First remove the custom domain (beta.lkpgpremiumcars.com) from the developers console.
Remove the A and AAAA records that you've added to the DNS.
Follow the instructions here and on step 1, only add the domain 'lkpgpremiumcars.com' and verify. This doesn't mean you're pointing the naked domain to your application.
Once it's verified, refresh the page and now you should have the domain available on step 2.
Select the second option on step 2, put 'beta' on the text box and select the previously added domain from the drop down beside. Click Add.
Go back to your DNS settings and add a CNAME record for 'beta' pointing to 'ghs.googlehosted.com.
Allow some time for propagation and it should work!

Setting up custom domain with www on appengine

I've set up a custom domain with Appengine.
The domain currently works as http://example.com (naked domain) but it throws a "This webpage is not available" error with http://www.example.com
Any idea how could I get the 'www' subdomain working? Would it be possible to fix it by adding/changing the DNS records (CNAME, TXT)?
The procedure is as follows:
Navigate to
https://console.developers.google.com/project/yourapp/appengine/settings/domains,
having replaced "yourapp" with your project name.
Click "Add custom Domain"
Go to the 2nd section (it will say "Select the domain you want to point to yourapp").
In that section, select the 2nd field, fill in "www" and select the domain in the dropdown.
Log in to your DNS management dashboard (this could be godaddy.com, namecheap.com, etc).
Add a CNAME record with your DNS host, as follows: alias: "www", address (canonical name): ghs.googlehosted.com, and save.
Give it a few minutes, and www.yoursite.com should now take you to your app (should be the same that can be found at yourapp.appspot.com).
Assumptions I made:
That you wish to point the DNS record to the default module of your AppEngine project. Please leave a comment if you wish 'www' to point to a different module.
That you have already registered your domain with Google and have a TXT DNS record there, proving your ownership of the domain to Google.

Dot Net Nuke Multiple Sites

There is a current install of DNN on one of my local webservers - this was installed before I took over this position. I am trying to add a second site, but the instructions I am following appear to be for attaching an existing site. Do I simply run the installer to create a new site in addition to the current? I've never used DNN before, so I am going at this blind.
All information I am finding is referencing the same as the instructions link I provided. Any assistance is greatly appreciated.
To add a little bit more information, here is another area where I am confused. Referencing the link, it states #2 to add a binding to my site, then #3 is to add the new portal. What I am trying to do is create a new DNN site - one does not yet exist, so I cannot do step 2 until a new portal is created. As said, I've never used DNN. I was tasked today to have this done by July 4th (nice, huh) so today is the first I am looking at DNN ever.
What I have done is added a new portal and I assumed it would create a new bare-bones site for me, but that is not what happened (obviously). So, instead of just adding an existing site for DNN, how do I add a new one (that is why I asked if I needed to reinstall)? From what I understand, there was an initial website setup with the installation of DNN. That basic site served what they needed - I need to do the same thing again, but, as can be seen, I've no clue how to do so.
No, you don't run the installer again. Remember DotNetNuke is PORTAL Hosting software, meaning with just 1 install you can run ~unlimited websites (of course there's always limits, depending on the hardware you're running on).
For instance if you're DNN install is running on www.myweb.com, and you want to add a site for www.yourweb.com, you simply point your DNS entry for www.yourweb.com to the IP of your DNN install, should be the same IP as www.myweb.com.
You then log into your DNN install as a HOST (superuser) user. You can't do this from using the Admin Login for www.myweb.com, that admin won't have the permissions to add a portal. When you do login as Host, you'll see two more menu items appear, 'Admin' and 'Host'. Admin pertains to functions you want to accomplish ONLY on www.myweb.com, the Host menu applies to the ENTIRE DNN install, including ALL portals you've setup.
Depending on your version number, you probably will see either 'Portals' or 'Site Management' (if it's a newer install, like 6.0+), once you click on or drop the HOST menu.
From there you fill out the specifics regarding your new www.youweb.com website, including the url and any aliases you want. Once you do that and the DNS propegates, you'll then be able to go to www.youweb.com and login and set that site up.
Step #2 is talking about adding a binding in IIS, not doing anything in DNN. You need to tell IIS about strategicplanning.mysite.com, so that it will send requests for that URL to your DNN site.
So, the process looks like this:
Make sure that the DNS record for strategicplanning.mysite.com points to your web server's IP address.
In IIS, update the host header bindings for the current application to include strategicplanning.mysite.com.
a. If you only have one portal in your DNN installation, at this point, trying to navigate to strategicplanning.mysite.com will automatically add it as a portal alias for that one portal.
b. If you have multiple portals in your DNN installation, at this point, trying to navigate to strategicplanning.mysite.com will show an error message about that URL not corresponding to an existing site.
In DotNetNuke, you need to go to the Site Management page in the Host menu (previously called Portals), and use the Manage/Action menu to add a new site. In the form that comes up, use strategicplanning.mysite.com as the alias (keep it marked as a parent portal), and fill in the rest of the details. If you want a blank site, make sure that you pick the Blank Website template (otherwise you'll need to delete a bunch of pages and modules you don't need).
This should be all that you need to do. If you navigate to strategicplanning.mysite.com and you see the original site, then strategicplanning.mysite.com has been added as a portal alias for that site, and you'll need to remove it (in Site Settings under the Admin menu).

Resources