HTTP默认端口80安装步骤:1、查询安装 查询:rqm -qa | grep httpd 安装:yum install -y httpd
2、配置网络3、vim-配置文件 配置完用命令:service httpd reload重新加载4、SELinux、防火墙5、服务启动6、客户端验证
一、Centos6程序环境
1、配置文件:
/etc/httpd/conf/httpd.conf
/etc/httpd/conf.d/*.conf
/etc/rc.d/init.d/httpd
配置文件:/etc/sysconfig/httpd
/usr/sbin/httpd
/usr/sbin/httpd.event
/usr/sbin/httpd.worker
/var/log/httpd
->access_log: 访问日志
error_log:错误日志
/var/www/html
/usr/lib64/httpd/modules
grep “Section” /etc/httpd/conf/httpd.conf
Section 1: Global Environment
Section 2: ‘Main’ server configuration
Section 3: Virtual Hosts
directive value
directive:不区分字符大小写
value:为路径时,取决于文件系统
1. 要访问:http://10.33.2.254/download/bash-4.4.2-3.el6.x86_64.rpm
2. 会访问:--> /www/rsq/download/bash-4.4.2-3.el6.x86_64.rpm
3.
4. 别名:Alias /URL/ "/PATH/TO/SOMEDIR/"
5. 定义“Alias /bbs/ "/Doc/htdocs"
6. 要访问:http://10.33.2.254/bbs/index.html
7. 会访问:--> /Doc/htdocs/bbs/