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>

Quickly install Apache Server on Ubuntu Linux
More Posts related to Ubuntu,
- Fix: Ubuntu (Linux) - bash: sudo: command not found error
- Quick steps to install Nginx on Ubuntu Linux
- Add new user in Ubuntu Linux using Terminal Command
- How to know current Ubuntu Linux version via terminal command
- How to stop/start/restart apache server using command [Ubuntu]
- Fix - sudo: systemctl: command not found
- How to install zsh shell on Ubuntu
- [Fix] Ubuntu E: Unable to locate package sudo error
- Quickly install Apache Server on Ubuntu Linux
- Install specific JRE on Ubuntu using apt
- Fix Ubuntu /bin/sh: 1: zsh: not found error
More Posts:
- Error: LinkageError occurred while loading main class UnsupportedClassVersionError [Eclipse Java] - Java
- Resolve System.IO.PathTooLongException [Sharepoint C# .Net] - SharePoint
- Project JDK is not defined [IntelliJ IDEA] - Java
- How to add Newline to text in Android TextView - Android
- Maven BUILD FAILURE: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin - Java
- Run JumpCloud Commands in Powershell - Powershell
- Base 64 Index, Character and Binary Table - Html
- SharePoint Server 2016 IT Preview Deprecated Removed features - SharePoint