1.apache 主目录
/usr/local/apache2
2.网站主目录
/usr/local/apache2/htdocs
3.配置文件
/usr/local/apache2/etc/httpd.conf
4.应用程序
/usr/local/apache2/bin/httpd
5.服务脚本
/usr/local/apache2/bin/apachectl
6.启动服务
/usr/local/apache2/bin/apachectl start
/usr/local/apache2/bin/apachectl restart
7.关闭服务
/usr/local/apache2/bin/apachectl stop
8.查看进程
pstree |grep httpd
9.查看端口
netstat -tunpl |grep :80
10.开机启动
vi /etc/rc.d/rc.local
/usr/local/apache2/bin/apachectl restart &>/dev/null
apache 配置文件:
1.监听端口
Listen 800
2.加载 php 的动态模块
LoadModule php5_module modules/libphp5.so
3.apache 服务的进程执行者
User daemon
4.apache 的网站根目录
DocumentRoot "/usr/local/apache2/htdocs"
5.apache 的网站根目录的服务权限
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
#先允许,后拒绝
Allow from all
#允许所有人
#不拒绝任何人
6.apache 的默认首页
DirectoryIndex index.php index.html
7.apache 的错误日志
ErrorLog "logs/error_log"
8.apache 的访问日志
CustomLog "logs/access_log" common
实时查看文件中的最后十行的变化:
tail -f access_log
9.404 页面不存在
ErrorDocument 404 /missing.html
10.包含外部配置文件
Include etc//extra/httpd-vhosts.conf
Copyright © 2013-2023 . All Rights Reserved. 宵云 版权所有 南通宵云网络科技有限公司
工信部备案:苏ICP备18049042号-2 公安部备案:苏公网安备 32060102320703号
《中华人民共和国增值电信业务经营许可证》经营性ICP/ISP/IDC三证:苏B1.B2-20210805