Search This Blog

Sunday, 18 June 2017

How to setup the Apache Virtual Host on Centos

Step 1: First you need to install the httpd package, using the following command
step 1
Step 2: Make a Directory under /var/www using the following command, this will be your document root
step 2
Step 3: Next change the ownership permission to the following directory using the Chown command
step 3
Step 4: Use the following command to ‘change mode‘ to changing the permission of files and folders to every one read
missing step
Step 5: Next Create a Index.html file under your document root
step 4
Step 6: Create your html file as your wish. This text will be displayed when you enter the ip address or domain name on the browser, save and exit using the :wq command
step 5

Step 7: Next you need to configure the httpd.conf file using the following command
step 6
Step 8: scroll down and find out the below place and edit it Remove the # command from the following sentence
NameVirtualHost *:80
<VirtualHost *:80>
</VirtualHost>
step 7
In DocumentRoot Section you need to mention directory created in Step 2

Step 9: Stop all apache process using the following command
step 8
Step 10: Finally Start the Service using the following command
step 9

That’s it now you can enter your IP address on the browser. It will call your index.html file.
final


Thank You…..

No comments:

Post a Comment