{"id":567,"date":"2017-02-03T17:41:23","date_gmt":"2017-02-03T17:41:23","guid":{"rendered":"https:\/\/visworlditsolution.wordpress.com\/?p=567"},"modified":"2017-02-03T17:41:23","modified_gmt":"2017-02-03T17:41:23","slug":"how-to-create-virtual-ip-address-through-real-ip-address-and-host-multiple-website","status":"publish","type":"post","link":"https:\/\/linux.thingsomething.com\/index.php\/2017\/02\/03\/how-to-create-virtual-ip-address-through-real-ip-address-and-host-multiple-website\/","title":{"rendered":"how to create virtual IP Address through real IP address and host multiple Website"},"content":{"rendered":"<p>hello guys today we will learn how to create virtual IP Address through real IP address and host multiple website on singles system. It&#8217;s a very simple process in RedHat Linux Server. Before we will install some necessary package for hosting Virtual IP address. if we want that \u00a0 all type package install easily in your linux machine \u00a0so we have to need YUM server we can configure YUM Server very easily you just lick on my link and look<a href=\"https:\/\/visworlditsolution.wordpress.com\/2016\/12\/26\/what-is-yum-and-how-to-create-in-redhat-linux-server\/\"> \u00a0how to configure YUM server.<\/a> After YUM server configure you just follow my simple Step<\/p>\n<p><span style=\"color:#ff0000;\"><span style=\"color:#ff9900;\"><b><span style=\"color:#ff0000;\">Step 1<\/span>\u00a0<\/b><\/span><strong><span style=\"color:#ff0000;\">\u00a0h<\/span>ere i agree that you have YUM server in our Linux machine then we will continue<\/strong><\/span><\/p>\n<pre style=\"font-size:large;\">[root@localhost ~]# ifconfig<\/pre>\n<pre style=\"font-size:15px;\">eth2      Link encap:Ethernet  HWaddr 08:00:27:35:57:7A\n          inet addr:<span style=\"color:#ff0000;\"><em><strong>192.168.56.103<\/strong><\/em><\/span>  Bcast:192.168.56.255  Mask:255.255.255.0\n          inet6 addr: fe80::a00:27ff:fe35:577a\/64 Scope:Link\n          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1\n          RX packets:1933 errors:0 dropped:0 overruns:0 frame:0\n          TX packets:632 errors:0 dropped:0 overruns:0 carrier:0\n          collisions:0 txqueuelen:1000\n          RX bytes:183768 (179.4 KiB)  TX bytes:107123 (104.6 KiB)\n          Base address:0xd248 Memory:f0840000-f0860000<\/pre>\n<p><span style=\"color:#ff9900;\"><strong>\u00a0Step2 \u00a0then we will virtual IP address Here kind this<\/strong><\/span><\/p>\n<pre style=\"font-size:14px;\">[root@localhost ~]# ifconfig eth1:0 192.168.56.108<\/pre>\n<p><span style=\"color:#ff0000;\"><strong>Step3 \u00a0then we will install php package through yum server<\/strong><\/span><\/p>\n<pre style=\"font-size:large;\">[root@localhost ~]# yum install php* -y<\/pre>\n<p><strong><span style=\"color:#ff0000;\">Step4 then we will going following directory \/var\/www\/html\/ and here create any folder for our website hosting for\u00a0example here i create two folder for my two web pages one is php folder two is html folder. And both folder in we will create html file\u00a0<\/span><\/strong><\/p>\n<pre style=\"font-size:large;\">[root@localhost ~]# cd \/var\/www\/html\/\n[root@localhost html]# mk dir php\n[root@localhost html]# mkdir html<\/pre>\n<p><strong><span style=\"color:#ff0000;\">Step5 here php and html folder in we will create any html files or our past our website content<\/span><\/strong><\/p>\n<pre style=\"font-size:large;\"><strong><span style=\"color:#008000;\">[root@localhost php]# vim php.php<\/span><\/strong>\n<span style=\"color:#3366ff;\">&lt;?echo\necho \"hello this is php demo \";\necho \"hello this is php website host demo\";\n?&gt;\n~\n~\n~\n:wq<\/span><\/pre>\n<pre style=\"font-size:large;\"><strong><span style=\"color:#008000;\">[root@localhost ~]# cd \/var\/www\/html\/html\n[root@localhost html]# vim html.html<\/span><\/strong>\n<span style=\"color:#3366ff;\">&lt;html&gt;\n&lt;head&gt;this is demo&lt;\/head&gt;\n&lt;title&gt;Demo&lt;\/title&gt;\n&lt;body&gt;\n&lt;h1&gt; this is dual webhosting deno in linux machine &lt;\/h1&gt;\n&lt;h2&gt;this dual  webhosting Demo with Virtual IP Address&lt;\/h2&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;\n~\n~\n~<\/span>\n<strong><span style=\"color:#008000;\">:wq<\/span><\/strong><\/pre>\n<p>Step5 then we will go Apache Configuration File and do something \u00a0below configuration<\/p>\n<pre style=\"font-size:large;\"><span style=\"color:#33cccc;\">#&lt;VirtualHost *:80&gt;\n#    ServerAdmin webmaster@dummy-host.example.com\n#    DocumentRoot \/www\/docs\/dummy-host.example.com\n#    ServerName dummy-host.example.com\n#    ErrorLog logs\/dummy-host.example.com-error_log\n#    CustomLog logs\/dummy-host.example.com-access_log common\n#&lt;\/VirtualHost&gt;<\/span>\n<strong><span style=\"color:#008000;\">&lt;VirtualHost 192.168.56.103:80&gt;\nDocumentRoot \/var\/www\/html\/php\/\nDirectoryIndex php.php\n&lt;\/VirtualHost&gt;\n&lt;VirtualHost 192.168.56.108:80&gt;\nDocumentRoot \/var\/www\/html\/html\/\nDirectoryIndex html.html\n&lt;\/virtualHost&gt;<\/span><\/strong>\n<span style=\"color:#ff9900;\">\"\/etc\/httpd\/conf\/httpd.conf\" 1000L, 33934C\n<\/span><\/pre>\n<p>here we will configure document root \u00a0Directory index with real and virtual ip Address<\/p>\n<p><strong><span style=\"color:#ff0000;\">Step 6 then we will restart serves below commands\u00a0<\/span><\/strong><\/p>\n<pre style=\"font-size:large;\"><span style=\"color:#008000;\"><strong>[root@localhost ~]# service httpd restart<\/strong><\/span><\/pre>\n<p><span style=\"color:#ff0000;\"><strong>Step 7 now we will off our Linux machine firewall and selinux through below commands \u00a0<\/strong><\/span><\/p>\n<pre style=\"font-size:large;\"><strong><span style=\"color:#008000;\">[root@localhost ~]# iptables -F\n[root@localhost ~]# setenforce 0<\/span><\/strong><\/pre>\n<p>Step 8 then we will going to any browser in put our IP address and Virtual ip address. now we will look that our website is looking here<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-571\" src=\"https:\/\/visworlditsolution.files.wordpress.com\/2017\/02\/vir.png?w=300\" alt=\"how to create virtual ip address\" width=\"931\" height=\"292\" \/><\/p>\n<p>if you have any problem in this process so please comment here i will solve your problem<\/p>\n<p>Thank you<\/p>\n<p>by Vishnu sharma<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>hello guys today we will learn how to create virtual IP Address through real IP address and host multiple website on singles system. It&#8217;s a &hellip; <span class=\"ml-btn\"><a href=\"https:\/\/linux.thingsomething.com\/index.php\/2017\/02\/03\/how-to-create-virtual-ip-address-through-real-ip-address-and-host-multiple-website\/\" class=\"more-link\">Read More<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[7,8,14],"tags":[116,185,214],"class_list":["post-567","post","type-post","status-publish","format-standard","hentry","category-it-solution","category-linux-rhel5","category-server-configuration","tag-how-to-create-virtual-ip-address","tag-real-ip-through-virtual-ip-address","tag-virtual-ip"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/posts\/567"}],"collection":[{"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/comments?post=567"}],"version-history":[{"count":0,"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/posts\/567\/revisions"}],"wp:attachment":[{"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/media?parent=567"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/categories?post=567"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/tags?post=567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}