Setting up Apache


Connecting to Our Ubuntu Server:
Requirements: PuTTy, Login Details, Port


Once the fields are correctly filled in we can go ahead and connect.
Upon login we’re going to want to start setting up our Apache 2 server, to do this we first need to run 2 commands listed below to install Apache 2
sudo apt-get update
sudo apt-get install apache2


You will be prompted during the installation of apache2 about memory being used. Installing will take about a minute to process.
Once we are in we need to enable the UFW (Uncomplicated Firewall)
                Sudo ufw enable
Then check the status of that firewall
                Sudo ufw status


Now we can see that site is setup in our var/www/ directory, we need to change it to ours so that its easier to make updates.
First, we navigate to apache root and change the 0000-deault.conf file. We need to change the line in which it specifies our document root.
I used vi,
Sudo vi 000-default.conf, changing the line to serve the desired location

The same process needs to be done in the root directory of apache2
Cd etc/apache2/
Sudo vi apache2.conf


Now apache will serve any index.html that is within that folder,
I’ve already placed an index.html in the location. Once we restart apache it will be live.
Sudo service apache2 restart




Apache is successfully setup and serving from the correct location



Comments

Popular posts from this blog

Website Setup