标签:级别 邮件 tab bash directory isa etc kconfig 位置
Apache 静态网页
1.安装
yum install httpd -y
2.配置文件
cd /etc/httpd/conf
vi httpd.conf
httpd.conf文件个别行讲解
var email 查看邮件
ServerName www.example.com:80去掉注释 否则会看见类似报错的信息
DocumentRoot /var/www/html 静态网页存放位置
DirectoryIndex 默认打开的首页
Loglevel warn 日志级别
LogFmart 日志格式
Alias 虚拟名
AddType 添加模块
virutal hosting 虚拟主机 (01.IP 02.域名 03.端口)
service httpd start
service iptables status关闭防火墙
查看selinux 修改selinux值
vi /etc/selinux/config
SELINUX=disabled
Apache脚本安装并设置
vi myhttp.sh
#!/bin/bash
yum install httpd -y
rpm -qa|grep httpd && echo"httpd has been created"
cd /etc/httpd/conf
mv httpd.conf httpd.conf.bak
awk ‘/serverName www\.example/{print "ServerName www.example.com:80";netxt}{print}‘
rm -f httpd.comf.bak
server httpd restart
chkconfig httpd on
echo "test html page"> /var/www/html/index.html
echo "Now you can interview the page by brower"
标签:级别 邮件 tab bash directory isa etc kconfig 位置
原文地址:https://www.cnblogs.com/BaiZe258/p/9184452.html