Monday, July 26, 2021
In this post we are going to install the Apache Web Server, which is the most common web server in the world. With a web server you can serve up web sites or business products on the web. Therefore it's kind of like giving your Linux system a purpose to exist.
The service you have to install is called httpd and the configuration files are located in the following directories
- /etc/httpd/conf/httpd.conf
- /var/www/html/index.html
And the log files are in /var/log/httpd
Here are the steps to install the Apache Web Server:
1. So first let's install the service, you can do this by typing the command dnf install httpd -y
2. In the /etc/httpd/conf/httpd.conf file you will see that the ServerRoot points to the folder /etc/httpd and it's listening to port 80 because of the line that says Listen 80, you can change the directory for the ServerRoot and Listen properties in the configuration file to change the directory and the port respectively. Another important setting is the DocumentRoot setting, this property defines your website's homepage or the starting point. Since the DocumentRoot points to the directory /var/www/html let's navigate to the directory and see if there's an index.html page in the directory
3. If you don't have an index.html page in the directory, t's easy enough to create one. Just type vi index.html in the directory and paste the following code in the file to get a simple html page. But for the most part you will have the default Apache index.html page and that's perfectly fine we just want to see that it works at the end of this lesson.
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<p>Hello Apache!</p>
</body>
</html>
4. Now that we have everything in place we want to start the service and enable it so that it starts on boot up with the following commands in order
- systemctl start httpd
- systemctl enable httpd
5. To view the web page you typing ifconfig to see the server's IP address
6. To view the web page you can just type in the IP address in the browser's address bar. If you can't view the page, type stopping the firewall with the command systemctl stop firewalld
Subscribe to:
Post Comments (Atom)
Search This Blog
Tags
Web Development
Linux
Javascript
DATA
CentOS
ASPNET
SQL Server
Cloud Computing
ASP.NET Core
ASP.NET MVC
SQL
Virtualization
AWS
Database
ADO.NET
AngularJS
C#
CSS
EC2
Iaas
System Administrator
Azure
Computer Programming
JQuery
Coding
ASP.NET MVC 5
Entity Framework Core
Web Design
Infrastructure
Networking
Visual Studio
Errors
T-SQL
Ubuntu
Stored Procedures
ACME Bank
Bootstrap
Computer Networking
Entity Framework
Load Balancer
MongoDB
NoSQL
Node.js
Oracle
VirtualBox
Container
Docker
Fedora
Java
Source Control
git
ExpressJS
MySQL
NuGet
Blogger
Blogging
Bower.js
Data Science
JSON
JavaEE
Web Api
DBMS
DevOps
HTML5
MVC
SPA
Storage
github
AJAX
Big Data
Design Pattern
Eclipse IDE
Elastic IP
GIMP
Graphics Design
Heroku
Linux Mint
Postman
R
SSL
Security
Visual Studio Code
ASP.NET MVC 4
CLI
Linux Commands
Powershell
Python
Server
Software Development
Subnets
Telerik
VPC
Windows Server 2016
angular-seed
font-awesome
log4net
servlets
tomcat
AWS CloudWatch
Active Directory
Angular
Blockchain
Collections
Compatibility
Cryptocurrency
DIgital Life
DNS
Downloads
Google Blogger
Google Chrome
Google Fonts
Hadoop
IAM
KnockoutJS
LINQ
Linux Performance
Logging
Mobile-First
Open Source
Prototype
R Programming
Responsive
Route 53
S3
SELinux
Software
Unix
View
Web Forms
WildFly
XML
cshtml
githu
No comments:
Post a Comment