{"id":526,"date":"2017-01-18T11:04:24","date_gmt":"2017-01-18T11:04:24","guid":{"rendered":"https:\/\/visworlditsolution.wordpress.com\/?p=526"},"modified":"2017-01-18T11:04:24","modified_gmt":"2017-01-18T11:04:24","slug":"how-to-configure-apache-web-server-in-redhat-linux","status":"publish","type":"post","link":"https:\/\/linux.thingsomething.com\/index.php\/2017\/01\/18\/how-to-configure-apache-web-server-in-redhat-linux\/","title":{"rendered":"How to configure Apache Web Server in RedHat Linux"},"content":{"rendered":"<p>hello guys today we will learn how to configure\u00a0Apache web Server \u00a0in Linux redhat and also host web page with Apache \u00a0web server. We will also understand concept of web server that how to host any website in Redhat Linux server. So before you need to \u00a0Configure YUM server in our \u00a0Linux machine. if you don&#8217;t know <a href=\"https:\/\/visworlditsolution.wordpress.com\/2016\/12\/26\/what-is-yum-and-how-to-create-in-redhat-linux-server\/\">how to configure yum in linux so click on \u00a0link<\/a> and look .\u00a0After YUM server configuration we can install any package in Linux very easily<\/p>\n<h2><span style=\"color:#ff0000;\">Step 1 here i accept you configure Yum in your Linux machine so fist we will install Http package<\/span><\/h2>\n<p>&nbsp;<\/p>\n<pre><strong><span style=\"color:#008000;\">[root@localhost ~]# yum install http*<\/span><\/strong><\/pre>\n<h2><span style=\"color:#ff0000;\">Step 2 then we off our Linux machine IP Address and also Disable Firewall and seLinux through below Commands\u00a0<\/span><\/h2>\n<pre><strong><span style=\"color:#008000;\">[root@localhost ~]# ifconfig<\/span><\/strong>\n<span style=\"color:#339966;\">eth0      Link encap:Ethernet  HWaddr 08:00:27:93:6D:E8\n          inet addr<span style=\"color:#008000;\"><strong>:192.168.56.101<\/strong><\/span>  Bcast:192.168.56.255  Mask:255.255.255.0\n          inet6 addr: fe80::a00:27ff:fe93:6de8\/64 Scope:Link\n          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1\n          RX packets:227 errors:0 dropped:0 overruns:0 frame:0\n          TX packets:197 errors:0 dropped:0 overruns:0 carrier:0\n          collisions:0 txqueuelen:1000\n          RX bytes:20134 (19.6 KiB)  TX bytes:25158 (24.5 KiB)<\/span><\/pre>\n<p><span style=\"color:#ff0000;\">Here my ip address is 192.168.56.101<\/span><\/p>\n<pre><span style=\"color:#008000;\"><strong>[root@localhost ~]# iptables -F\n[root@localhost ~]# setenforce 0<\/strong><\/span><\/pre>\n<h2><span style=\"color:#ff0000;\">Step 3 then we will Start httpd Service and go to any browser Url bar and put our Linux machine ip Address\u00a0<\/span><\/h2>\n<pre><span style=\"color:#008000;\"><strong>[root@localhost ~]# service httpd restart<\/strong><\/span>\n<span style=\"color:#0000ff;\">Stopping httpd:                                            [  OK  ]\nStarting httpd:                                            [  OK  ]<\/span><\/pre>\n<p><span style=\"color:#ff0000;\">then we will look Apache web server description and instruction here \u00a0 \u00a0<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-529\" src=\"https:\/\/visworlditsolution.files.wordpress.com\/2017\/01\/screenshot-47.png?w=300\" alt=\"Apache web server in linux \" width=\"1257\" height=\"368\" \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-529\" src=\"https:\/\/visworlditsolution.files.wordpress.com\/2017\/01\/screenshot-47.png?w=300\" alt=\"Apache web server in linux\" width=\"300\" height=\"88\" \/><\/p>\n<h2><span style=\"color:#ff0000;\">Step 2 now we will go our Linux terminal \u00a0and put below commands\u00a0<\/span><\/h2>\n<pre><strong><span style=\"color:#008000;\">[root@localhost ~]# cd \/var\/www\/html\n[root@localhost html]#<\/span><\/strong><\/pre>\n<h2><span style=\"color:#ff0000;\">Step3 here this directory in we will create simple Html page\u00a0<\/span><\/h2>\n<p>for example here i create index.html file<\/p>\n<pre><span style=\"color:#008000;\"><strong>[root@localhost html]# vim index.html<\/strong><\/span>\n<span style=\"color:#800080;\">&lt;html&gt;\n&lt;head&gt; demo&lt;\/head&gt;\n&lt;title&gt; Demo index File&lt;\/title&gt;\n&lt;body&gt;\n&lt;h1&gt; This is  Apache web Server Demo &lt;\/h1&gt;\n&lt;h2&gt; you can found linux server all configureation in visworlditsolution.com&lt;\/h2&gt;\n&lt;marqoee&gt;&lt;h2&gt; visworlditsolution.com is a very help full website in it fields&lt;\/h2&gt;&lt;\/marqoee&gt;\\\n&lt;\/body&gt;\n&lt;\/html&gt;<\/span>\n~\n~\n~\n:wq<\/pre>\n<h2><span style=\"color:#ff0000;\">Step4 then we will go \u00a0to Apache man configuration file and do something configure like this<\/span><\/h2>\n<pre><span style=\"color:#008000;\"><strong>[root@localhost html]# vim \/etc\/httpd\/conf\/httpd.conf<\/strong><\/span><\/pre>\n<pre><span style=\"color:#33cccc;\">979 #\n980 # VirtualHost example:\n981 # Almost any Apache directive may go into a VirtualHost container.\n982 # The first VirtualHost section is used for requests without a known\n983 # server name.\n984 #\n985 #&lt;VirtualHost *:80&gt;\n986 #    ServerAdmin webmaster@dummy-host.example.com\n987 #    DocumentRoot \/www\/docs\/dummy-host.example.com\n988 #    ServerName dummy-host.example.com\n989 #    ErrorLog logs\/dummy-host.example.com-error_log\n990 #    CustomLog logs\/dummy-host.example.com-access_log common\n991 #&lt;\/VirtualHost&gt;<\/span>\n<strong><span style=\"color:#008000;\">992 &lt;virtualHost 192.168.56.101:80&gt;\n993 DocumentRoot \/var\/www\/html\/\n994 Directoryindex index.html\n995 &lt;\/VirtualHost&gt;<\/span>\n<span style=\"color:#008000;\">:wq\n<\/span><\/strong><\/pre>\n<h2><span style=\"color:#ff0000;\">Step5- we will restart httpd servies<\/span><\/h2>\n<pre><span style=\"color:#008000;\"><strong>[root@localhost html]# service httpd restart<\/strong><\/span>\n<span style=\"color:#3366ff;\">Stopping httpd:                                            [  OK  ]\nStarting httpd: [Thu Jan 19 05:05:47 2017] [error] (EAI 2)Name or service not known: Failed to resolve server name for 192.168.56.101 (check DNS) -- or specify an explicit ServerName\n                                                           [  OK  ]\n[root@localhost htm<\/span>l]#<\/pre>\n<h2><span style=\"color:#ff0000;\">also check httpd below commands<\/span><\/h2>\n<pre><strong><span style=\"color:#008000;\">[root@localhost html]# httpd -t<\/span><\/strong><\/pre>\n<h2><span style=\"color:#ff0000;\">then we will on httpd \u00a0server below commands<\/span><\/h2>\n<pre><strong><span style=\"color:#008000;\">chkconfig httpd on<\/span><\/strong><\/pre>\n<h2><span style=\"color:#ff0000;\">\u00a0Step 6 now go to internet browser and type your linux machine ip address<\/span><\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-530\" src=\"https:\/\/visworlditsolution.files.wordpress.com\/2017\/01\/screenshot-48.png?w=300\" alt=\"web server Apache \" width=\"658\" height=\"237\" \/><\/p>\n<p>Its a very simple process .if you have any problem in this process so please comments here i will solve your problem if you like my tutorial so follow my website like ,share,<\/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 configure\u00a0Apache web Server \u00a0in Linux redhat and also host web page with Apache \u00a0web server. We will &hellip; <span class=\"ml-btn\"><a href=\"https:\/\/linux.thingsomething.com\/index.php\/2017\/01\/18\/how-to-configure-apache-web-server-in-redhat-linux\/\" 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":[8,14],"tags":[38,80,100,219],"class_list":["post-526","post","type-post","status-publish","format-standard","hentry","category-linux-rhel5","category-server-configuration","tag-apache-in-linux","tag-how-to-configure-apache-in-linux","tag-how-to-configure-web-server-in-redhat-linux","tag-web-hosting-in-linux"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/posts\/526"}],"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=526"}],"version-history":[{"count":0,"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/posts\/526\/revisions"}],"wp:attachment":[{"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/media?parent=526"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/categories?post=526"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/tags?post=526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}