搜索
系统检测到您的用户名不符合规范:

手动搭建lamp(centos7+apache2.4+mysql5.6.26+php7)P2

浏览:2189 发布日期:2017年08月02日 分类:技术分享 关键字: lamp apache(httpd)部署
PART2 (A)

apache简介
apache在centos的发行版里面的名称是httpd,在ubuntu的发行版上还是apache。而且在centos7里面安装httpd,很简单。

开始:
1.直接安装
yum install -y httpd

2.目录
安装目录:/etc/httpd
配置目录:/etc/httpd/conf/httpd.conf

3.修改配置文件 <Directory "/var/www/html">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All #这是关键的地方,如果不改成All,就没法重写路径,无法正常访问tp框架

#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
4.启动apache(httpd)
systemctl start httpd 开启

5.开机自启动:
systemctl enable httpd

6.这时候就能通过ip地址访问服务器了(例:http://47.88.170.95)
这里可能会有其他问题导致无法访问:
1)系统防火墙(firewalld)
2)服务商的安全策略(阿里云有)
备注:以上的我总结为端口问题,这有个端口扫描网址:http://tool.chinaz.com/port/

7.其他用到命令:
systemctl start httpd 开启
systemctl stop httpd 关闭
systemctl restart httpd 重启
systemctl status httpd 状态
systemctl enable httpd 开启自启动
systemctl disable httpd 关闭自启动


其他PART的虫洞:
linux:http://www.thinkphp.cn/topic/edit/id/50594.html
apache:http://www.thinkphp.cn/topic/50595.html
msql:http://www.thinkphp.cn/topic/50596.html
php7:http://www.thinkphp.cn/topic/50597.html

最佳答案
评论() 相关
后面还有条评论,
评论支持使用[code][/code]标签添加代码
您需要登录后才可以评论 登录 | 立即注册
收藏
小沙
积分:1948 等级:LV3
热点推荐
(追記) (追記ここまで)
最新更新

我们

合作

网站

信息

ThinkPHP 是一个免费开源的,快速、简单的面向对象的 轻量级PHP开发框架 ,创立于2006年初,遵循Apache2开源协议发布,是为了敏捷WEB应用开发和简化企业应用开发而诞生的。ThinkPHP从诞生以来一直秉承简洁实用的设计原则,在保持出色的性能和至简的代码的同时,也注重易用性。并且拥有众多的原创功能和特性,在社区团队的积极参与下,在易用性、扩展性和性能方面不断优化和改进,已经成长为国内最领先和最具影响力的WEB应用开发框架,众多的典型案例确保可以稳定用于商业以及门户级的开发。

AltStyle によって変換されたページ (->オリジナル) /