I want to add a server to my domain name - networking

I recently purchased a domain name and I have an old computer I was wondering if there were any how to's or tutorials on how to set up the server and use the domain name I already purchased.

I am just providing with a beautiful link which guides one to set up a safe and secure Web Server.
here it goes--->http://arstechnica.com/gadgets/2012/11/how-to-set-up-a-safe-and-secure-web-server/

I recommend installing something like Ubuntu Minimal 14.04 on the old machine, then hooking it up to the internet and installing NGINX. After you have the website working, you can forward ports 80 and 443 and set the DNS of your domain to your IP address.

Related

SSL Certificates explanation

Can someone answer a simple SSL Cert question for me to derisk my decision?
My Stack: Bitami WordPress instance on GCP VM.
Situation
I have a website with an SSL cert linked to my domain name.
I started an instance with a new static IP address.
I remapped the domain name to the new servers and added the correct credentials [confirmed everything is configured correctly with the GCP team].
Ran -dig command and confirmed new instance is mapped to the domain name.
Problem
The domain name will not load in the browser. Get the "NET:: ERR_CERT_INVALID" message.
My Diagnosis
I haven't transferred my SSL to my new IP address.
Confusion
Everywhere I read says the SSL is mapped to the domain name, not the IP address itself. So theoretically there should not be an issue.
Question(s) to you
Do I solve this simply by generating new SSL cert on the new instance? Will that just overwrite the old SSL cert and map my domain name to the new SSL cert?
If not - what's the solution?
I don't understand the technical relationship between IP address, domain names, and certs. I have read as much as I can and everyone seems to talk around it but not explain it in detail.
Thanks in advance!
Bitnami Engineer here,
If you created a new instance from scratch, you will need to migrate the SSL certificates from the first instance to the second one. You can either copy the SSL certificates from the machine or download them again from the CA website and substitute the files you have in the /opt/bitnami/apache2/conf folder.
In case you were using a Let's Encrypt certificate, you can generate new certificates by using the Bitnami HTTPS configuration tool (/opt/bitnami/bncert-tool) or by running the CLI tool to generate new certificates. If you use the Bitnami HTTPS configuration tool, you won't need to modify the Apache's configuration, the tool will do that for you. You can learn more about it here
https://docs.bitnami.com/google/how-to/understand-bncert/
Please remember to confirm that the domain name is configured properly by checking your domain using this online tool before trying to generate the certificates
https://www.whatsmydns.net/
New problem.
I used the bncert tool as per Jotas recommendation and it worked well.
I checked my domain name via 'whatsmydns' as well as my SSL via an SSL checking tool. All worked out as expected - my IP address is matching against my Domain name and SSL is matching against my domain name.
I type my domain name into the browser and it loads my site with the padlock, across all browsers.
So from the outside - it looks like everything is fine.
But I have two issues still.
Problem #1:
In my WordPress 'general>settings', I tried to update my 'WordPress address' and 'site address' but they are greyed out. So I updated my wp-config file with the new https addresses as per these instructions which have worked for me before without issues (https://www.wpbeginner.com/wp-tutorials/how-to-change-your-wordpress-site-urls-step-by-step/). It didn't break the site, but I could no longer log in. As soon as I deleted the new wp-config code, I could log in again. So if that won't work, I now have no course of action to update my 'WordPress' and 'site' addresses.
So my questions are - do you know why this won't work? Is it a bitnami quirk? And does it matter? If the domain is working, does it matter if I keep the wp-config file as an http address and not an https address?
Problem #2:
My domain name takes me to my site at the correct IP address. It loads with a secure padlock icon. I can log in. Everything works as it should.
If I use the IP address, however, instead of the domain name, it also loads the same site but as an insecure site with no padlock.
Question - Any idea how that is possible? I thought a domain name was just a human-friendly version of an IP address. And if the webserver is a single server, how can using a domain name versus an IP address generate different front end results?
Thanks again team, as a person who is new to this community, it really does give you faith in humanity.

IIS: published asp.net app replace ip with domain name

I have already rent an online server.
I'm installing IIS on it, hosting a website on it.
to access the site from internet, I must type: {ipaddress}/siteAppName
My question is how to use a name instead of ip address? should I buy and register a new domain name? if that the case how could I configure this ip with a new domain name?
More Details:
I am renting a dedicated server... so I have full access to the server as I'm hosting my website on it. but I don't have a domain name. either from local machine or remotely I can successfully access the hosted website using the ip address of my server/webAppName.. but the problem is that I'm trying to get ssl certificate, but the generated CSR is rejected from all SSL suppliers because the url is not accepted, and I think that it's not accepted because of using IP instead of a domain name. I mentioned many self-conclusions here, but I'm not sure about any of them... That's why I'm asking.
It depends on your hoster but most allow you to use a registered domain name. They should have instructions on how to set this up.

Configuring BIND for Ubuntu Web Server

I am looking for some assistance configuring BIND to host a DNS server on my web server.
I recently acquired a dedicated server running Ubuntu 14.04 LTS and I already have Nginx, PHP-FPM, MariaDB installed and working perfectly. My knowledge of postfix & dovecot are slim, so I followed this guide: A Mailserver on Ubuntu 14.04: Postfix, Dovecot, MySQL. The good news is that I've got mail coming in and going out as expected, but have come across another issue, which is some ISP and providers are denying the mail since there is no PTR records used.
So, I'm assuming I need to install and configure BIND to set up DNS and to set up a PTR record so that my mail will reach its destinations. I've tried Google with some tutorials but none of them seem clear for my purpose.
Installing a control panel, or one of those all-in-one scripts is out of the question since I already have the web server configured. Another issue is that some of them don't work with Nginx or use a different configuration of PHP. Plus, I want to learn how to do this on my own.
You don't have to install bind. Who ever has reverse DNS authority for your IP block will typically create a reverse name for you. Just request a reverse pointer record with the mail domain name for your IP.

How to install WordPress locally to be viewed externally via static ip

i wanna install a WordPress locally on xampp , to be viewed and edited externally through the internet via static ip , i have been trying it but keep running into problems , can someone help me through a number of steps that i can accomplish that , without having any problems in the future , there is bits and pieces everywhere but no specific set of instructions , on how to do that , please can someone help.
Thank you so much.
(This first step is the easy part, just software and small interaction.)
Install Wordpress with xampp or another, this PC will need to be on as a normal server in order to access local or by Internet -> http://es.wikihow.com/instalar-Wordpress-en-XAMPP
(Hardware part)
After tested localhost/wp (or any name you like) you need to forward the port 80 of the pc with has WP to the router that has visible IP (I'm sharing some samples with most known brands):
portforward.com/english/routers/port_forwarding/AirLive/WL-1500R/Zmodo_M6304.htm
www.noip.com/support/knowledgebase/tp-link-router-port-forwarding/
www.howtogeek.com/66214/how-to-forward-ports-on-your-router/ (THIS HAS GOOD IMAGES TO UNDERSTAND BETTER)
You won't be able to access router config by Internet because the router will redirect you to the WP "server". To check the public IP just go to: http://www.whatismyip.com/
Share the IP with a friend or connect with 3G/4G on phone, put it on browser and your server will be ready to use on Internet.
5 (optional) you can install dynamic DNS to fix a name to your local server, because usually the Internet provider changes the IP numbers, and if you use it some day you won't be able to connect because your router would be using another IP (example: www.noip.com/ )
I hope you find this info useful. Regards

Multiple domains in 443 port in same IP

i have hosted the one website "www.example1.com" in port 443(https) in IIS 7. now i bought a new domain for "www.example2.com" for same IP. i would like to host the another website in this domain(www.example2.com) in port 443(i already used port 443 for "www.example1.com").
How can i do this? Is this possible to host two domains in port 443 in same IP? If yes could anyone please let me know the right way to do this? I am using IIS 7.
It CAN be done.
SSL Host Headers in IIS 7 allow you to use one SSL certificate for multiple IIS websites on the same IP address. Through the IIS Manager interface, IIS only allows you to bind one site on each IP address to port 443 using an SSL certificate. If you try to bind a second site on the IP address to the same certificate, IIS 7 will give you an error when starting the site up stating that there is a port conflict. In order to assign a certificate to be used by multiple IIS sites on the same IP address, you will need to set up SSL Host Headers by following the instructions below.
What Type of SSL Certificate Do You Need?
Because you can only use one certificate, that certificate needs to work with all the hostnames of the websites that you use it with (otherwise you will receive a name mismatch error). For example, if each of your IIS 7 websites uses a subdomain of a single common domain name (like in the example below), you can get a Wildcard Certificate for *.mydomain.com and it will secure site1.mydomain.com, site2.mydomain.com, etc.
If, on the other hand, your IIS 7 sites all use different domain names (mail.mydomain1.com, mail.mydomain2.com, etc.), you will need to get a Unified Communications Certificate (also called a SAN certificate).
Setting up SSL Host Headers on IIS 7
Obtain an SSL certificate and install it into IIS 7. For step-by-step instructions on how to do this, see Installing an SSL Certificate in Windows Server 2008 (IIS 7.0).
Once the certificate is installed into IIS, bind it to the first site on the IP address.
Open the command prompt by clicking the start menu and typing “cmd” and hitting enter.
Navigate to C:\Windows\System32\Inetsrv\ by typing “cd C:\Windows\System32\Inetsrv\” on the command line.
In the Inetsrv folder, run the following command for each of the other websites on the IP address that need to use the certificate (copy both lines):
appcmd set site /site.name:"<IISSiteName>" /+bindings.[protocol='https',bindingInformation='*:443:<hostHeaderValue>']
Replace <IISSiteName> with the name of the IIS site and <hostHeaderValue> with the host header for that site (site1.mydomain.com)
Test each website in a browser. It should bring up the correct page and show the lock icon without any errors. If it brings up the web page of the first IIS site, then SSL Host Headers haven’t been set up correctly.
in iis 7.5 or newer versions
- Sites > Add Website
- Site Name: example2.com
- Physical Path: select directory
- Binding: same ip as example.com
- Host name: example2.com
then in binding check this for both websites
You can't in IIS7 - each HTTPS binding requires a unique IP/port combination because the Host Header cannot be used to differentiate sites using SSL. This is because the host header is not visible during the SSL handshake.
Your workaround is to differentiate the sites by binding to a different external IP, or by binding to a port other than 443. Both options are less than ideal I know.
There's a great MSDN blog on this.
Fortunately IIS8 appears to have a solution in the form of Server Name Indication (SNI).
Interestingly this is not an IIS quirk, Apache has the same issue, as would any web server before the introduction of SNI.
I currently use IIS 6.0.
I have managed to set up multiple web sites using port 443 and different certificates.
From the IIS manager, go to the web site and edit site bindings.
Simply make sure that the Require Server Name Indication box is ticked and leave the IP address: as All Unassigned.
You now use the same port (443) for multiple sites by selecting the appropriate certificate for the site from the dropdown list of certificates.
We also host multiple sites in port 443 but we need UNIQUE IP addresses for each site.
You cannot bind multiple sites to port 443 using only one IP address.
Unless there is a work-around, but I'm not aware of any.
This article may help:
http://www.harbar.net/articles/ssl.aspx
If you are using a wildcard certificate, just use the format *.domainname.com in the friendly name and the IIS GUI will enable the hostname control for you when you are editing the binding.
Source

Resources