apache服务器
软件包目录
apache
软件包:
httpd-2.2.15-26.el6.x86_64.rpm
配置文件:
/etc/http/conf/httpd.conf
/etc/http/conf.d/*.conf
服务数据目录:
/var/www/html
端口:80443
切换进程和线程模式
vim/etc/sysconfig/httpd
HTTPD=/usr/sbin/httpd.worker
发布目录
cp-r/boot/var/www/html
测试:
elinks192.168.1.254
elinks--dump192.168.1.254
elinks192.168.1.254/boot
基于用户家目录发布网页
1.useraddrobin
useraddzorro
2.vim/etc/httpd/conf/httpd.conf
#UserDirdisabled
UserDirpublic_html
3.创建
mkdir/home/zobin/public_html
mkdir/home/zorro/public_html
echo"robin'shome">>/home/robin/public_html/index.html
echo"zorro'shome">>/home/rorro/public_html/index.html
4.该权限
chmod777/home/robin/
chmod777/home/zorro/
5.servicehttpdrestart
测试
elinks192.168.1.254/~robin
elinks192.168.1.254/~zorro
虚拟主机
基于域名
1mkdir/var/www/baidu/
mkdir/var/www/google/
2.vim/etc/httpd/conf/httpd.conf
NameVirtualHost*:80
documentroot/var/www/baidu
servername
echo"google">>/var/www/google/index.html
4.设置解析/etc/hosts
192.168.1.254
Tags:软件包目录,apache服务器
版权声明:本站文章来源标注为YINGSOO的内容版权均为本站所有,欢迎引用、转载,请保持原文完整并注明来源及原文链接。禁止复制或仿造本网站,禁止在非www.yingsoo.com所属的服务器上建立镜像,否则将依法追究法律责任。本站部分内容来源于网友推荐、互联网收集整理而来,仅供学习参考,不代表本站立场,如有内容涉嫌侵权,请联系alex-e#qq.com处理。