Install and configure Apache server on Ubuntu? – User friendly Tech help

Quick recipe to install and configure apache server?
nStep1:- Update the package manager and install apache2
nExecute the below commands in terminal:- 

n

    n

  • sudo apt-get update
  • n

  • sudo apt-get install apache2
  • n

n

sudo – super user
napt-get, for latest package
n
n
nStep2:- Edit the apache configuration file

n

    n

  • sudo nano /etc/apache2.conf
  • n

nn

nScroll to the end and add,  ServerName localhost
nctrl +x (for exiting the editor) , press y and enter
n
nStep3:-Check that server is running or not

n

nStep4:- Start the apache server

n

nStep5:- Open browser with localhost, and see our server is running and launch a index.html file(note, we have changed our port to 403)
n

nn

nNote:- This index.html file which apache server showed above can be located in /etc/apache2/var/www/html
n
n
nErrors:- Incase default port 80 is already used you will get the below error on starting apache server?
n(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
n
nSolution:- Change the port value inside /etc/apache2/apache2.conf say to different port 403, now restart the apache server and open localhost:403, it will launch the server
n
n
nKeep Learning and Keep Sharing 🙂

n

Install MySql
nInstall PHP 

Was this article helpful?
YesNo

Similar Posts