HTTP Server on CENTOS 7
# setenforce 0
# sed -i 's/enforcing/disabled/g' /etc/selinux/config
# yum install httpd
# yum install epel-release -y
# yum install httpd -y
# yum install php -y
# yum install php-common -y
# yum install php-mysqlnd -y
# yum install php-mbstring -y
# yum install php-gd -y
# yum install mariadb-server -y
# yum install mod_ssl -y
# yum install zip -y
# yum install wget -y
# yum install unzip -y
Manage Apache HTTP Server on CentOS 7
# systemctl start httpd
# systemctl start mariadb
# systemctl enable httpd
# systemctl status httpd
Configure FIREWALL to Allow Apache Traffic
# firewall-cmd --zone=public --permanent --add-service=http
# firewall-cmd --zone=public --permanent --add-service=https
# firewall-cmd --reload
Configure Name-based Virtual Hosts on CentOS 7
# vi /etc/httpd/conf.d/vhost.conf
Please write down these following line in the file.
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@mytecmint.com
ServerName mytecmint.com
ServerAlias www.mytecmint.com
DocumentRoot /var/www/html/mytecmint.com/
ErrorLog /var/log/httpd/mytecmint.com/error.log
CustomLog /var/log/httpd/mytecmint.com/access.log combined
</VirtualHost>
# setenforce 0
# sed -i 's/enforcing/disabled/g' /etc/selinux/config
# yum install httpd
# yum install epel-release -y
# yum install httpd -y
# yum install php -y
# yum install php-common -y
# yum install php-mysqlnd -y
# yum install php-mbstring -y
# yum install php-gd -y
# yum install mariadb-server -y
# yum install mod_ssl -y
# yum install zip -y
# yum install wget -y
# yum install unzip -y
To change the http configuration file
# sed -i 's/AllowOverride none/AllowOverride all/g' /etc/httpd/conf/httpd.conf
Manage Apache HTTP Server on CentOS 7
# systemctl start httpd
# systemctl start mariadb
# systemctl enable httpd
# systemctl status httpd
Configure FIREWALL to Allow Apache Traffic
# firewall-cmd --zone=public --permanent --add-service=http
# firewall-cmd --zone=public --permanent --add-service=https
# firewall-cmd --reload
Configure Name-based Virtual Hosts on CentOS 7
# vi /etc/httpd/conf.d/vhost.conf
Please write down these following line in the file.
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@mytecmint.com
ServerName mytecmint.com
ServerAlias www.mytecmint.com
DocumentRoot /var/www/html/mytecmint.com/
ErrorLog /var/log/httpd/mytecmint.com/error.log
CustomLog /var/log/httpd/mytecmint.com/access.log combined
</VirtualHost>
No comments:
Post a Comment