How to configure Apache Server (http) in CentOS 7, Redhat 7, Fedora. - Linux tech Solutions
How to configure Apache Server (http) in CentOS 7, Redhat 7, Fedora
Http/Apache is used to host a single website or multiple website on system with static IP address.The Apache HTTP Server, is free and open-source cross-platform web server software, released under the terms of Apache License 2.0. Apache is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation.
The Apache HTTP Server is cross-platform; as of 1 June 2017 92% of Apache HTTPS Server copies run on Linux distributions. Version 2.0 improved support for non-Unix operating systems such as Windows and OS/2. Old versions of Apache were ported to run on OpenVMS and NetWare.
http - 80
https - 443
Selinux context httpd_sys_content_t
Main Configuration filfe /etc/httpd/conf/httpd.conf
Document root /var/www/html
Server Configuration :-
To configure Apache server we must have an static ip.
1 )first of all we will install the httpd package :-
2 )Now we will create our own configuration file in /etc/httpd/conf.d
You can create with the configuration file with any name but the file extension must be .conf .
In this configuration file you have to give the following parameters:-
3 )Now you need to go the /etc/hosts file.
#[your IP] [your Website name]
4 )Now we will to to the document root and create a index.html file.
My First Web Site
5 )Now we will start the httpd service.
6 )Now Apply the Firewall rule.
[[email protected] ~]# firewall-cmd --reload
7 )Now our website is ready we will open it in firefox browser
The Video below is a step by step guide.