一 常见web服务
apache是internet上使用最多的web程序,它基于httpd协议传输和响应数据
常用的方法:
GET
HEAD
POST
httpd.service
二 安装配置
yum install httpd
systemctl enable httpd.service
systemctl start httpd.service
firewall-cmd --permanent --add-service=http --add-service=https
firewall-cmd --reload
firewall-cmd --list-all
vi /etc/httpd/conf/httpd.conf
ServerAdmin [email protected]
semanage fcontext -a -t httpd_sys_content_t '/new/localtion(/.*)'
setfacl -R -m g:webmasters:rwX /var/www/html
setfacl -R -m g:webmasters:rwx /var/www/html
2.virtual hosts
vi /etc/httpd/conf.d/site1.conf
<Directory /srv/site1/wwww>
Require all granted
AllowOverride None
</Directory>
<VirtualHost 192.168.1.1:80>
DocumentRoot /srv/site1/www
ServerName site1.example.com
ServerAdmin webmaster@xxxx
ErrorLog "logs/xxx"
CustomLog "logs/sie" combined
</VirtualHost>
3. https
genkey <FQDN>
vi /etc/httpd/conf.d/ssl.conf
4. PHP
三 配置实例
wordpress
四 高可用
keepaliave+LV+apache
本文转自 woshiwei201 51CTO博客,原文链接:http://blog.51cto.com/chenwei/1841967