Let's see quick steps to install Apache Server on Ubuntu Linux,
Steps:
- Run Command: sudo update,
- Now Run Command: sudo apt install apache2,
- Type Y if you are asked to install dependent packages or note disk space usage,
After this operation, 109 MB of additional disk space will be used. Do you want to continue? [Y/n]
- You might be asked to select the Geographical region,
Please select the geographic area in which you live. Subsequent configuration questions will narrow this down by presenting a list of cities, representing the time zones in which they are located. 1. Africa 3. Antarctica 5. Arctic 7. Atlantic 9. Indian 11. SystemV 13. Etc 2. America 4. Australia 6. Asia 8. Europe 10. Pacific 12. US Geographic area:
- You will also be asked to select the timezone,
Please select the city or region corresponding to your time zone. 1. Aden 16. Brunei 31. Hong_Kong 46. Kuala_Lumpur 61. Pyongyang 76. Tehran 2. Almaty 17. Chita 32. Hovd 47. Kuching 62. Qatar 77. Tel_Aviv 3. Amman 18. Choibalsan 33. Irkutsk 48. Kuwait 63. Qostanay 78. Thimphu 4. Anadyr 19. Chongqing 34. Istanbul 49. Macau 64. Qyzylorda 79. Tokyo .. .. .. 14. Beirut 29. Hebron 44. Kolkata 59. Phnom_Penh 74. Tashkent 89. Yekaterinburg 15. Bishkek 30. Ho_Chi_Minh 45. Krasnoyarsk 60. Pontianak 75. Tbilisi 90. Yerevan If you have selected Region as America 1. Adak 33. Cancun 65. Halifax 97. Mexico_City 129. Rio_Branco 2. Anchorage 34. Caracas 66. Havana 98. Miquelon 130. Santa_Isabel 3. Anguilla 35. Cayenne 67. Hermosillo 99. Moncton 131. Santarem .. .. 9. Argentina/Jujuy 41. Creston 73. Indiana/Vevay 105. New_York 137. Sitka 10. Argentina/La_Rioja 42. Cuiaba 74. Indiana/Vincennes 106. Nipigon 138. St_Barthelemy 11. Argentina/Mendoza 43. Curacao 75. Indiana/Winamac 107. Nome 139. St_Johns
- Now you should be retured to the prompt.
Testing apache2 server by deploying sample html page
Lets to to /var/www/html location and create a sample html page,
# nano /var/www/html/sample.html
Start apache2 server:root@c2c:/var/www/html# sudo service apache2 start
* Starting Apache httpd web server apache2
AH00558: apache2: Could not reliably determine the server's fully qualified domain name,
using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
*
To test the server is up, lets try doing curl at localhost/sample.html or 172.17.0.2/sample.html (in my case, the IP may vary for your case)
root@c2c:/var/www/html# curl 172.17.0.2/sample.html
<html>
<head>
<title>Apache2 Example</title>
</head>
<body>
<h1>Hello from Apache2 on Ubuntu!</h1>
</body>
</html>
More Posts related to Ubuntu,
- Fix - sudo: systemctl: command not found
- How to know the version of Ubuntu
- [Fix] Ubuntu E: Unable to locate package sudo error
- How to install Apache Maven on Ubuntu
- Steps to Kill a Running Process in Ubuntu Linux
- How to know current Ubuntu Linux version via terminal command
- How to stop/start/restart apache server using command [Ubuntu]
- Fix: Ubuntu (Linux) - bash: sudo: command not found error
- Ubuntu: How to search for a package to install using apt in Terminal
- Fix: E: Command line option --installed is not understood in combination with the other options
- How to install Python on Ubuntu
- Ubuntu Linux: How to Login as root User
- Access Windows share folder in Ubuntu Device in Network
- Add a User as a Sudoer Using Ubuntu Linux Command Line Terminal
- Install Oh My Zsh on Ubuntu Docker complete steps
- Fix: Make makefile:31 Error 127 (GCC)
- [fix] openssl No such file or directory error C++
- How to install zsh shell on Ubuntu
- Install Golang (Go) on Ubuntu
- Ubuntu Linux: Unzip a zip file using Terminal
- Where are Environment Variables stored in Ubuntu
- apt-get list --installed packages in Ubuntu Linux
- Ubuntu: List all Installed Packages using apt
- Quick steps to install Nginx on Ubuntu Linux
- How to kill service running on a port on Ubuntu Linux
More Posts:
- Fix: AttributeError: str object has no attribute decode. Did you mean: encode?[Python] - Python
- Enable Dark Mode in Gmail Desktop Browser - Google
- Install Microsoft Remote Desktop (RDP) Client on Mac - Microsoft
- Android EditText Cursor Colour appears to be white - Android
- Steps to Kill a Running Process in Ubuntu Linux - Ubuntu
- Google Local Guide Program and Perks of Contributing to Google Maps - Google
- Java 8: Convert Stream to Array - Java
- [Fix] Docker Error response from daemon: manifest for :latest not found: manifest unknown - Docker