# rpm -qa | grep httpd
httpd-tools-2.2.15-39.el6.centos.i686
httpd-2.2.15-39.el6.centos.i686
.
-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
瀏覽器:
http://192.168.2.105/w3/
++++++++++++++++++
# 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/
沒有留言:
張貼留言