domain mapping

How To Map DOMAIN & IP on cloud set-up

Purchase a server from any cloud server selling vendor
EX:I have purchased a one virtual machine from godaddy and  static-IP address assigneed to it is “192.169.170.133
try ping ans ssh to server

mohammedrafi@NOC-RAFI:~$ ping 192.169.170.133
PING 192.169.170.133 (192.169.170.133) 56(84) bytes of data.
64 bytes from 192.169.170.133: icmp_seq=1 ttl=49 time=271 ms
64 bytes from 192.169.170.133: icmp_seq=2 ttl=49 time=246 ms
^C
— 192.169.170.133 ping statistics —
3 packets transmitted, 2 received, 33% packet loss, time 2003ms
rtt min/avg/max/mdev = 246.547/258.946/271.345/12.399 ms

mohammedrafi@NOC-RAFI:~$ ssh rafi@192.169.170.133
rafi@192.169.170.133’s password:
Last login: Wed Apr 13 06:08:43 2016 from 111.93.18.22
[rafi@openstack ~]$

Purchase a domain ur looking for based on availablity at domain seller.
EX:I have purchased a domain named as “linuxmadeeasy.in”

U need to map the domain u have purchased that is “linuxmadeeasy.in” with the ip address “192.169.170.133” which is nothing but a A-RECORD.
for this u need to manage the DNS-SERVER of the domain provider saying that point my domain to the appropriate ip(can be from any provider need not to be same where u purchased domain).

And now i have manged dns server at GODADDY and i pointed my A-RECORD and i will try to ping it now with my domain name “linuxmadeeasy.in”

mohammedrafi@NOC-RAFI:~$ ping linuxmadeeasy.in
PING linuxmadeeasy.in (192.169.170.133) 56(84) bytes of data.
64 bytes from ip-192-169-170-133.ip.secureserver.net (192.169.170.133): icmp_seq=1 ttl=49 time=246 ms
64 bytes from ip-192-169-170-133.ip.secureserver.net (192.169.170.133): icmp_seq=2 ttl=49 time=246 ms
^C
— linuxmadeeasy.in ping statistics —
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 246.370/246.521/246.672/0.151 ms

It is clear that my domain is pointed with IP.

u can check with nslookup & dig also

mohammedrafi@NOC-RAFI:~$ nslookup linuxmadeeasy.in
Server: 127.0.1.1
Address: 127.0.1.1#53

Non-authoritative answer:
Name: linuxmadeeasy.in
Address: 192.169.170.133

mohammedrafi@NOC-RAFI:~$ dig linuxmadeeasy.in

; <<>> DiG 9.9.5-3ubuntu0.6-Ubuntu <<>> linuxmadeeasy.in
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17593
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 7, ADDITIONAL: 15

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;linuxmadeeasy.in. IN A

;; ANSWER SECTION:
linuxmadeeasy.in. 49 IN A 192.169.170.133

;; AUTHORITY SECTION:
in. 22115 IN NS a1.in.afilias-nst.in.
in. 22115 IN NS b2.in.afilias-nst.org.
in. 22115 IN NS a0.in.afilias-nst.info.
in. 22115 IN NS b0.in.afilias-nst.org.
in. 22115 IN NS a2.in.afilias-nst.info.
in. 22115 IN NS c0.in.afilias-nst.info.
in. 22115 IN NS b1.in.afilias-nst.in.

;; ADDITIONAL SECTION:
a0.in.afilias-nst.info. 22115 IN A 199.7.87.1
a0.in.afilias-nst.info. 22115 IN AAAA 2001:500:29::1
a1.in.afilias-nst.in. 22115 IN A 115.249.164.142
a1.in.afilias-nst.in. 22115 IN AAAA 2001:4528:fff:13::142
a2.in.afilias-nst.info. 22115 IN A 199.249.117.1
a2.in.afilias-nst.info. 22115 IN AAAA 2001:500:45::1
b0.in.afilias-nst.org. 22115 IN A 199.253.56.1
b0.in.afilias-nst.org. 22115 IN AAAA 2001:500:50::1
b1.in.afilias-nst.in. 22115 IN A 125.19.40.90
b1.in.afilias-nst.in. 22115 IN AAAA 2404:a800:2:1e::19:90
b2.in.afilias-nst.org. 22115 IN A 199.249.125.1
b2.in.afilias-nst.org. 22115 IN AAAA 2001:500:4d::1
c0.in.afilias-nst.info. 22115 IN A 199.253.57.1
c0.in.afilias-nst.info. 22115 IN AAAA 2001:500:51::1

;; Query time: 5 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Thu Apr 14 10:14:35 IST 2016
;; MSG SIZE  rcvd: 540

And also u can check the domain owner by whois

mohammedrafi@NOC-RAFI:~$ whois linuxmadeeasy.in
Domain ID:D414400000000643792-AFIN
Domain Name:LINUXMADEEASY.IN
Created On:13-Apr-2016 10:02:00 UTC
Last Updated On:13-Apr-2016 10:02:00 UTC
Expiration Date:13-Apr-2017 10:02:00 UTC
Sponsoring Registrar:GoDaddy.com, LLC (R101-AFIN)
Status:ADDPERIOD
Registrant ID:CR237422572
Registrant Name:shaik mohammed rafi
Registrant Organization:
Registrant Street1:hyderabad
Registrant Street2:
Registrant Street3:
Registrant City:hyderabad
Registrant State/Province:Telangana
Registrant Postal Code:500082
Registrant Country:IN
Registrant Phone:+91.8977702123
Registrant Phone Ext.:
Registrant FAX:
Registrant FAX Ext.:
Registrant Email:mohammedrafi494@gmail.com
Admin ID:CR237422574
Admin Name:shaik mohammed rafi
Admin Organization:
Admin Street1:hyderabad
Admin Street2:
Admin Street3:
Admin City:hyderabad
Admin State/Province:Telangana
Admin Postal Code:500082
Admin Country:IN
Admin Phone:+91.8977702123
Admin Phone Ext.:
Admin FAX:
Admin FAX Ext.:
Admin Email:mohammedrafi494@gmail.com
Tech ID:CR237422573
Tech Name:shaik mohammed rafi
Tech Organization:
Tech Street1:hyderabad
Tech Street2:
Tech Street3:
Tech City:hyderabad
Tech State/Province:Telangana
Tech Postal Code:500082
Tech Country:IN
Tech Phone:+91.8977702123
Tech Phone Ext.:
Tech FAX:
Tech FAX Ext.:
Tech Email:mohammedrafi494@gmail.com
Name Server:NS43.DOMAINCONTROL.COM
Name Server:NS44.DOMAINCONTROL.COM

The above :Name Server Are those which are helping my domain  linuxmadeeasy.in to get resolved when request comes and points & forwards the request to my ip address 192.169.170.133

And the content in my web-server will get displayed.
Fallow below steps to to build apache.

[root@openstack ~]# yum install httpd

[root@openstack ~]# cat >>/var/www/html/sample.html 
<head>
<body>
Hello every one
</body>
</head>

[root@openstack ~]# cat >> /etc/httpd/conf/httpd.conf 
<virtualhost *:80>
documentroot /var/www/html/
directoryindex sample.html
servername linuxmadeeasy.in
</virtualhost>

[root@openstack ~]# service httpd status
Redirecting to /bin/systemctl status  httpd.service
● httpd.service – The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Docs: man:httpd(8)
man:apachectl(8)

Apr 13 03:24:13 openstack systemd[1]: Starting The Apache HTTP Server…
Apr 13 03:24:13 openstack httpd[11524]: AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using f… message
Apr 13 03:24:13 openstack systemd[1]: Started The Apache HTTP Server.
Apr 13 06:09:33 openstack systemd[1]: Stopping The Apache HTTP Server…
Apr 13 06:09:34 openstack systemd[1]: Stopped The Apache HTTP Server.
Hint: Some lines were ellipsized, use -l to show in full.

[root@openstack ~]# httpd -t
AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using fe80::f816:3eff:fe6b:56a8. Set the ‘ServerName’ directive globally to suppress this message
Syntax OK

[root@openstack ~]# netstat -tlpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      692/sshd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1809/sendmail: acce
tcp6       0      0 :::22                   :::*                    LISTEN      692/sshd

[root@openstack ~]# service httpd start
Redirecting to /bin/systemctl start  httpd.service

[root@openstack ~]# service httpd status
Redirecting to /bin/systemctl status  httpd.service
● httpd.service – The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: active (running) since Wed 2016-04-13 21:57:17 MST; 34s ago
Docs: man:httpd(8)
man:apachectl(8)
Main PID: 12505 (httpd)
Status: “Total requests: 0; Current requests/sec: 0; Current traffic:   0 B/sec”
CGroup: /system.slice/httpd.service
├─12505 /usr/sbin/httpd -DFOREGROUND
├─12506 /usr/sbin/httpd -DFOREGROUND
├─12507 /usr/sbin/httpd -DFOREGROUND
├─12508 /usr/sbin/httpd -DFOREGROUND
├─12509 /usr/sbin/httpd -DFOREGROUND
└─12510 /usr/sbin/httpd -DFOREGROUND

Apr 13 21:57:17 openstack systemd[1]: Starting The Apache HTTP Server…
Apr 13 21:57:17 openstack httpd[12505]: AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using f… message
Apr 13 21:57:17 openstack systemd[1]: Started The Apache HTTP Server.
Hint: Some lines were ellipsized, use -l to show in full.

[root@openstack ~]# netstat -tlpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      692/sshd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1809/sendmail: acce
tcp6       0      0 :::80                   :::*                    LISTEN      12505/httpd
tcp6       0      0 :::22                   :::*                    LISTEN      692/sshd

Open Browser and check the url by typing by domain name.

If u want the server to get security with ssl certs.

Steps to make ur website secure is add ssl certificates to your domain with the approval from ssl provider.
login into the ssl provider and fill CSR(certificate signing request from),once they cross check ur request they will sign it send u the certifictes back u need to add those certs in ur server.

U can also do self signed certificates.

U can also proceed for request with openssl procedure.

And wait for the reply from ssl-certs provider once received u can start adding the certs and make ur domain secured.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s