ABOUT HTTPD SERVER ( Apache Webserver)
One of the most commonly used web-server today is Apache web server (Httpd server).
We can access the website as they are hosted on webserver- we normally call as server. They acts as proxy server or load balancer.
The request from browser or client flows by using http protocol.
URL=https://IP_ADRESS/example.html
example.html is the resource being requested.
INSTALLATION STEPS ON RHEL:-
Install Apache server:
- Command to install Apache in Linux server.
# yum install httpd
2. Start the Apache process by using systemctl.
# systemctl start httpd
3. Check the service running status by executing the below command.
# systemctl status httpd
After installation process is completed we can validate the server status by accessing the IP/Host URL.
https://IP_ADDR_OF_HOST_SERVER:PORT/Resource
We don't need to added port explicitly as the browser adds the webserver server’s default port -80.
This should show sample screen as shown below.
APACHE WEB SERVER’S CONFIGURATION:-
The most critical configuration file in apache is httpd.conf file.
All configuration for apache are included in this config file- httpd.conf.
- Listen Port configuration.
- SSL Configuration
- Virtual Host
The configuration file of Apache and the installation method vary according to different distributions of Linux. But the default document root is /var/www/html
in all distributions. We can customize the path based on our application requirement.
By default when directory is requested below file get displayed.
Apache server can be configured to listen more than 1 port.
HTTP STATUS
When a web page is accessed server returns different status based on request being process.
200 — Success ; 404 — Page not found ; 403 — The requested resource is forbidden.