Apache


Apache

启动:
apachectl start/stop/status

重启:
systemctl restart apache2

Apache首先提供PHP页面:
/etc/apache2/mods-enabled/dir.conf

PHP根目录路径:
/files/usr/var/www/html

PHP测试:
在根目录下新建 phpinfo. php
编辑:

apache配置:
端口:
/etc/httpd/conf/httpd.conf
这是旧版本的

apache2的配置文件:
/etc/apache2/apache2.conf
duan

修改端口:
/etc/apache2/ports.conf
000-default. conf

添加本地回路服务器:

vim /etc/apache2/apache2.conf

最后加入一句:
ServerName localhost:

apache2根目录:
DocumentRoot 是这个站点的根目录,这样 Apache2 启动时会扫描 /etc/apache2/sites-enabled 中可用的 website 配置并加载
它在apache.conf里
PHP APACHE 测试:

都在这个路径:
var/www/html/文件


Author: DaMing
Reprint policy: All articles in this blog are used except for special statements CC BY 4.0 reprint polocy. If reproduced, please indicate source DaMing !
 Previous
SSH相关操作 SSH相关操作
SSH相关操作 生成ssh密匙:ssh-keygen -t rsa ssh数据地址:~/.ssh 公匙 :~/.ssh/id_rsa_pub 私匙:~/.ssh/id_rsa_public 为GIT生成密匙:Git方:git confi
2020-04-02 DaMing
Next 
Hello World Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hex
2020-03-30 DaMing
  TOC