cenotos安装apache
yum install httpd
配置系统启动时自动启动apache
chkconfig --levels 235 httpd on
启动apache:
/etc/init.d/httpd start
重启
/etc/init.d/httpd restart
停止服务
/etc/init.d/httpd start
新建index.html文件
vi /var/www/html/index.html
录入数据this is a test page
关闭防火墙
service iptables off
浏览
curl localhost/index.html
配置文件地址
在CentOS中Apache的默认文档的根目录是/var/www/html,配置文件/etc/httpd/conf/httpd.conf。其他配置存储在/etc/httpd/conf.d/目录里。
浙公网安备 33010602011771号