內容選單標籤

2015年1月25日 星期日

Server2_http

# yum -y install httpd
# rpm -qa | grep httpd
httpd-tools-2.2.15-39.el6.centos.i686

httpd-2.2.15-39.el6.centos.i686

# vi /etc/sysconfig/iptable
.
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
# service iptables restart
# service httpd start

# ps aux | grep httpd   //或netstat -tunlp
# chkconfig httpd on   //即setup或ntsysv

# vi /etc/httpd/conf/httpd.conf

.
.
DirectoryIndex index.html index.html.var index.php
.
ServerName www.502.kk:80
.
KeepAlive On
#service httpd restart




++++++++++++++++++


# vi /etc/httpd/conf/httpd.conf

<IfModule mod_userdir.c>
.
# UserDir disabled
.
UserDir public_html


</IfModule>
.
.
Alias /webkk7 /home/kk7/public_html
.
# service httpd restart
# chmod 711 /home/kk7
# vi /home/kk7/index.html

瀏覽器:

http://192.168.2.105/~kk7

http://192.168.2.105/webkk7

(Alias /webkk7 /home/kk7/public_html)


+++++++++++++++++++++++++

# mkdir /webs
# chmod 711 /webs

# cd /webs
# vi index.html
.
this is from /webs


# vi /etc/httpd/conf/httpd.conf
.
Alias /w3 /webs
# service httpd restart

瀏覽器:

http://192.168.2.105/w3/

沒有留言:

張貼留言