HTTP-SEVER
===============================
http - hyper text transfar protocol
port no. - 80, 443
package - http
deamon - httpd
---------------
* install the 'http' package
#yum install http* -y
* Edit the file of /etc/httpd/conf/httpd.conf
#vim /etc/httpd/conf/httpd.conf
serverAdmin root@server1.deo.com
Documentroot /var/www/html
ServerName server1.deo.com
NameVirtual Host 192.168.0.1:80
:wq
* creat a file with .html extance
#vim /var/www/html/index.html
write any in the file
:wq
* Add the all port
#iptables -I INPUT -s 192.168.0.0/24 -p tcp -m multiport --dport 80,443 -j ACCEPT
[ same with 'UDP' protocol ]
#service iptables save
#service iptables restart
*Configure the selinux security context
#chcon -R -u system_u /var/www/httml/index.html
#chcon -R -t httpd_sys_content_t /var/www/html/index.html
#service httpd restart
=======================================
FROM CLIENT END ACCESS THE WEBSITE
#elinks http://192.168.0.1
or
#elinks www.server1.deo.com
===================================
===============================
http - hyper text transfar protocol
port no. - 80, 443
package - http
deamon - httpd
---------------
* install the 'http' package
#yum install http* -y
* Edit the file of /etc/httpd/conf/httpd.conf
#vim /etc/httpd/conf/httpd.conf
serverAdmin root@server1.deo.com
Documentroot /var/www/html
ServerName server1.deo.com
NameVirtual Host 192.168.0.1:80
:wq
* creat a file with .html extance
#vim /var/www/html/index.html
write any in the file
:wq
* Add the all port
#iptables -I INPUT -s 192.168.0.0/24 -p tcp -m multiport --dport 80,443 -j ACCEPT
[ same with 'UDP' protocol ]
#service iptables save
#service iptables restart
*Configure the selinux security context
#chcon -R -u system_u /var/www/httml/index.html
#chcon -R -t httpd_sys_content_t /var/www/html/index.html
#service httpd restart
=======================================
FROM CLIENT END ACCESS THE WEBSITE
#elinks http://192.168.0.1
or
#elinks www.server1.deo.com
===================================
No comments:
Post a Comment