Edit configuration file :
Open the Apache configuration file following location and modify
[root@sysadmin]# vim /etc/httpd/conf/httpd.conf
Listen 10.102.152.198:80
ServerName www.manivel.com
DocumentRoot "/var/www/html/manivel/"
save and close.
Now Restart the service
[root@sysadmin]# /etc/init.d/httpd restart
Disable Security Enhanced Linux (SElinux) :
[root@sysadmin]# vim /etc/selinux/config
Check Security Enhanced Linux status using following command
[root@sysadmin]# getenforce
Disable Firewall setting :
[root@sysadmin ~]# system-config-firewall-tui
You want with Firewall setting follow
Start the iptables service
[root@sysadmin ~]# /etc/init.d/iptables start
Write iptables rule to allow HTTP (or) port 80
[root@sysadmin ~]# iptables -t filter -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
Save the above rule using below command
[root@sysadmin ~]# /etc/init.d/iptables save
Now Restart the iptables service
[root@sysadmin ~]# /etc/init.d/iptables restart
Testing HTTP working or not
Yes, HTTP is working.
Open the Apache configuration file following location and modify
[root@sysadmin]# vim /etc/httpd/conf/httpd.conf
Listen 10.102.152.198:80
ServerName www.manivel.com
DocumentRoot "/var/www/html/manivel/"
save and close.
Now Restart the service
[root@sysadmin]# /etc/init.d/httpd restart
Disable Security Enhanced Linux (SElinux) :
[root@sysadmin]# vim /etc/selinux/config
Check Security Enhanced Linux status using following command
[root@sysadmin]# getenforce
Disable Firewall setting :
[root@sysadmin ~]# system-config-firewall-tui
You want with Firewall setting follow
Start the iptables service
[root@sysadmin ~]# /etc/init.d/iptables start
Write iptables rule to allow HTTP (or) port 80
[root@sysadmin ~]# iptables -t filter -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
Save the above rule using below command
[root@sysadmin ~]# /etc/init.d/iptables save
Now Restart the iptables service
[root@sysadmin ~]# /etc/init.d/iptables restart
Testing HTTP working or not
Yes, HTTP is working.
No comments:
Post a Comment