How to configure the apache2 in the ubuntu 16.04 Step by Step

How to configure the apache2 in the ubuntu 16.04 Step by Step

Refer the video for configure apache2 in youtube




For installing the apache2 configuration first we need to update the apt get repository




now we need to install the apche2 with the following command   
    #apt-get install apache2



Give the following command to start the apache2

    #service apache2 star    t



for checking the service status

    #service apche2 status



Now we going to allow the apche2 service through firewall

for that we need to check the firewall status this will shows which are the ports allowed by the firewall



now we enable the apche2 with following command

          #ufw app list  

this command will show the which are the service available in the ubuntu16.04

here showing following the apache

apache – only 80 port allow (enable http)

apache full – allow the 80 and 443 in the firewall (enable the http and https)

apache secure – allow the 443 (enable the https/tls )



now I am going the allow the apache


    #ufw apache allow

note :if your'e working with production server allow the apache full


now we will check the firewall status

     #ufw status








Now check the status of apache

    #/etc/init.d/apache2 status




now configuration of website

I am download on html template from websit and upload it to the /var/www/html this default path uploading the website




For that we need to copy the configuration file from /etc/apache2/sites-available
and default configuration file is 000-default.conf

go to the following path and copy the default file

/etc/apache2/sites-available# cp 000-default.conf /etc/apache2/sites-available/techharvest.com.conf





Edit the techharvest.com.conf





Need to add the lines and save it

now enable the site of techharvest.com

    #a2enable techharvest.com.conf



If dont need need disable the default site with the following commad

    #a2dissite 000-default.conf




Restart the apche2



now enter the site in host file

/etc/hosts


    #vi /etc/hosts

going to check form the browser





It will working




Note: if you want https enable apache2 please mentioned in commmand

Comments

Popular posts from this blog

Enable the SSL in jetty web server

How to install Edubuntu in Windows through oracle VM

Error:yum install telnet Loaded plugins: refresh-packagekit, rhnplugin This system is not registered with RHN. RHN support will be disabled. Setting up Install Process No package telnet available. Error: Nothing to do